-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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 and push docker/docker-compose images upon release #9787
Conversation
Signed-off-by: Nick Sieger <[email protected]>
@@ -186,3 +186,9 @@ COPY --from=releaser /out/ / | |||
# see open-pr job in .github/workflows/docs.yml for more details | |||
FROM scratch AS docs-reference | |||
COPY docs/reference/*.yaml . | |||
|
|||
FROM base AS release-image |
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.
The base image is go/alpine, with docker and git installed in it. Anything else that we think should go in here?
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 notice we're installing docker from alpine's apk repositories, which are builds of docker built by alpine. Perhaps that's ok for testing, but we definitely should not ship those as part of images for end-users.
Having a "runnable" compose image with docker installed basically replicates the official docker:cli
image; see docker-library/docker#369
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.
Good point, I think basing compose off the official docker cli image would be a lot better.
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.
Oh, nevermind! Compose is in the latest docker:*-cli images. Then I'll see if we can use that.
Don't think it makes sense to create a runnable image for compose. An artifact image with base scratch and the binary like buildx is enough imo. See also docker/buildx#656. This way user can choose whatever base they want like the FROM docker
COPY --from=docker/compose-bin /docker-compose /usr/libexec/docker/cli-plugins/
RUN docker compose version Also update docs to show how to use it inside an image. See https://github.com/docker/buildx#dockerfile. About hub slug might be better to have smth like buildx I think: |
👆 good point to use a different name for the image, as there's the existing "compose" image, which was a bit of a hack to run compose as container instead of installing (to be used in combination with this script: https://github.com/docker/compose/blob/1.29.2/script/run/run.sh) and users may expect it to be a replacement for that. |
We want to have a runnable An artifact image like you're suggesting could be useful for users to build upon, but I believe it still makes sense for us to have a runnable image (and we'd still want to have one regardless to move the above mentioned workflow from the host -> containers). |
compose is now part of the docker, so the best option for that is the official |
Let me also /cc @tianon for help with that image; I know the current images for "cli" contain the daemon as well; this should change soon for the next engine release, but perhaps we can already update for the current release. |
This was fixed in docker-library/docker#369! 😄 (and Compose v2 has been part of the images since docker-library/docker#361, both as |
Excellent, thanks @tianon |
What I did
Add release-image bake target and bin-image ci workflow for pushing docker/docker-compose image.
Related issue
(not mandatory) A picture of a cute animal, if possible in relation with what you did