-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build: Make distroless image default and publish mimir-alpine #8204
Conversation
fe093a0
to
171b337
Compare
171b337
to
836115e
Compare
wait for support ticket to be implemented to create 3 repo in dockerhub |
dee79e4
to
7f76fbc
Compare
the run for testing also alpine during deploy https://github.com/grafana/mimir/actions/runs/9290241970/job/25566956834 |
a2c7154
to
fca8c2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left minor comments. Thank you.
Makefile
Outdated
fi; | ||
@echo | ||
# We need gcompat -- compatibility layer with glibc, as race-detector currently requires glibc, but Alpine uses musl libc instead. | ||
$(SUDO) docker build --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) --build-arg=USE_BINARY_SUFFIX=true --build-arg=BINARY_SUFFIX=_race --build-arg=EXTRA_PACKAGES="gcompat" -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(IMAGE_TAG_RACE) $(@D)/ | ||
# for grafana/mimir which is based on distroless image, the EXTRA_PACKAGES is just ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we even pass EXTRA_PACKAGES
to the build then? We can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a search in project, this is used in other dockerfiles still, not only for cmd/mimir, we still need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean now, it is UPTODATE_RACE target which is only for cmd/mimir, removing it.
Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
--build-arg=BASEIMG="gcr.io/distroless/base-nossl-debian12" \ | ||
-t $(IMAGE_PREFIX)$(shell basename $(@D))-distroless:$(IMAGE_TAG_RACE) $(@D)/; \ | ||
--build-arg=EXTRA_PACKAGES="gcompat" \ | ||
-t $(IMAGE_PREFIX)$(shell basename $(@D))-alpine:$(IMAGE_TAG_RACE) $(@D)/; \ | ||
fi; | ||
@echo | ||
# We need gcompat -- compatibility layer with glibc, as race-detector currently requires glibc, but Alpine uses musl libc instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should be moved to "alpine" version. For distroless image, we should restore comment about using distroless/base-nossl-debian12 as base image.
…a#8204) * Security: Make distroless image default and publish mimir-alpine * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Peter Štibraný <pstibrany@gmail.com> * remove extra_package for distroless uptodate_race target --------- Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
Following a trend by at other database teams: * grafana/loki#13325 * grafana/mimir#8204
Following a trend by at other database teams: * grafana/loki#13325 * grafana/mimir#8204
* chore: Replace alpine with distroless Following a trend by at other database teams: * grafana/loki#13325 * grafana/mimir#8204 * Also build debug image for main
What this PR does
Which issue(s) this PR fixes or relates to
Make distroless the default base image for grafana/mimir. To minimize the change, i just switched dockerfiles and changed makefile, pipeline stayed mostly untouched.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.