Skip to content
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

Create buildx image #656

Merged
merged 1 commit into from Jun 30, 2021
Merged

Create buildx image #656

merged 1 commit into from Jun 30, 2021

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Jun 29, 2021

Fixes #647

Could be used like this:

FROM docker
COPY --from=docker/buildx:latest /buildx /usr/libexec/docker/cli-plugins/docker-buildx

e.g. https://hub.docker.com/r/crazymax/buildx/tags?page=1&ordering=last_updated

image

cc @chris-crone

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

@crazy-max crazy-max force-pushed the buildx-image branch 2 times, most recently from b561b58 to 709a68d Compare June 29, 2021 13:49
@tonistiigi
Copy link
Member

As this is not a runnable image it might lead to even more confusion. Maybe if it was under a different name that makes it more clear. But logically it should just be inside the docker image(or image that contains both).

@crazy-max
Copy link
Member Author

As this is not a runnable image it might lead to even more confusion. Maybe if it was under a different name that makes it more clear.

Agree, changed to docker/buildx-bin if it makes sense.

But logically it should just be inside the docker image(or image that contains both).

I think we can start with a dedicated non-runnable buildx image for now and could be included later in the official docker image using COPY --from? See also docker-library/docker#243.

README.md Outdated Show resolved Hide resolved
@tonistiigi
Copy link
Member

SGTM

@AkihiroSuda @chris-crone

@chris-crone
Copy link
Member

SGTM as buildx can be used standalone. I agree with @tonistiigi that we should have everything in the docker image and that should be most people's default.

@crazy-max

This comment has been minimized.

@maniator
Copy link

As this is not a runnable image it might lead to even more confusion. Maybe if it was under a different name that makes it more clear. But logically it should just be inside the docker image(or image that contains both).

Agreed

@maniator
Copy link

SGTM as buildx can be used standalone. I agree with @tonistiigi that we should have everything in the docker image and that should be most people's default.

Cant we do something like I did here? https://hub.docker.com/r/maniator/dind-buildx

@crazy-max crazy-max mentioned this pull request Jun 30, 2021
@crazy-max crazy-max marked this pull request as ready for review June 30, 2021 13:35
@crazy-max
Copy link
Member Author

@chris-crone has created the secrets. SGTM to merge.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
README.md Show resolved Hide resolved
@crazy-max crazy-max merged commit 9b4937f into docker:master Jun 30, 2021
@crazy-max crazy-max deleted the buildx-image branch June 30, 2021 18:22
@tonistiigi
Copy link
Member

As this is not a runnable image it might lead to even more confusion. Maybe if it was under a different name that makes it more clear. But logically it should just be inside the docker image(or image that contains both).

I'm starting to change my mind about this one. It might be kind of useful to have it for working with remote instances or testing out various versions with docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock docker/buildx . That image should be on top of alpine and, contain ca-certificates etc. We also need to improve the ux. We can inject environment variable into container so that if image gets run without a correct endpoint it would show messages about the docker flags that need to be exposed (eg. docker socket or if context is empty then volume for that or same for credentials). I guess same could be possible when image runs in k8s pod but because k8s API is authenticated I don't think it is as common as docker.sock.

Would be cool if docker run --privileged docker/buildx would also work without any docker socket or remote address. I guess with process driver #21 . We do ship daemonless buildctl script with moby/buildkit but that is buildctl and doesn't have a good ux. Maybe a special tag that contains buildkit binaries already so they don't need to be pulled on each invocation.

That doesn't change that buildx should be included in docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there an official docker buildx docker image?
4 participants