-
Notifications
You must be signed in to change notification settings - Fork 535
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
CI: Build/publish multi-architecture Docker images via ko #1124
Conversation
709f372
to
69b8b21
Compare
Great work!
🎉 I have few questions:
|
Thanks @pstibrany!
The fork adds the ability to separate building and publishing into two different steps. I.e., the fork adds a sub-command If we start using ko and it works well for us, I will ask upstream if it's interesting to them.
Absolutely.
This is because the |
Pushed updated build-image with |
46d8d3a
to
956a482
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.
This is some great work 👍
I think the main gap from my point of view is that (according to my understanding) ko won't make any use at all of cmd/mimir/Dockerfile
. Which might lead to some change between images before and after.
So I think lines like
EXPOSE 8080
and
RUN apk add --no-cache ca-certificates
would need to be implemeted through ko (and I think you have done the ca-certificates using grafana/alpine:3.15.0).
I think ideally we should make use of ko images within GL as well, so we can get to the bottom of potential issues.
956a482
to
7e8b842
Compare
@simonswine I guess we can migrate away from the Dockerfile once we've eventually migrated to ko, yeah. I have implemented adding CA certificates via the base image yes. Unfortunately I found that ko's default base image breaks the integration tests due to lack of permission to read TLS certificates in the filesystem. |
50c26df
to
4518996
Compare
@simonswine do we need to replicate this from Dockerfile? Is it useful at all?
|
I guess the only thing that uses it which I am aware of is |
e8e6cc2
to
51ff74f
Compare
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Tagging images as latest is necessary for integration test to find the Mimir image. Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
Signed-off-by: Arve Knudsen <[email protected]>
e6e51fe
to
242cca9
Compare
…form-images Signed-off-by: Arve Knudsen <[email protected]>
…form-images Signed-off-by: Arve Knudsen <[email protected]>
…form-images Signed-off-by: Arve Knudsen <[email protected]>
Thank you for your work. After #1772 we will now publish multiarch images using Docker buildx and skopeo. |
OK, closing the PR. |
What this PR does:
Build and publish Docker images via ko, a tool originally made by Google for containerizing Go apps. I've forked ko to allow for storing images as an intermediate step, and then publishing those stored images in another step. The images get stored as an OCI image layout, since it's the most practical format.
The most important change, functionally speaking, is that multi-architecture Docker manifest lists get published (containing AMD64 and ARM64 images) for Mimir and tools (mimirtool, metaconvert, query-tee).
Removal of Dockerfiles
Since ko doesn't use Dockerfiles, I'm removing the Dockerfiles except for the build image one (still has to be built with Docker). I've also updated the Makefile to reflect this, hope I got everything right in this regard.
Testing of ko-based Docker manifest list
I've tested the AMD64 image produced by ko (ko pushes a multi-architecture manifest list, the Docker installation on my machine picks AMD64) by following the getting started guide, and it works well. The integration test suite also works.
Which issue(s) this PR fixes:
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]