Skip to content

Conversation

@kotaroooo0
Copy link

@kotaroooo0 kotaroooo0 commented Aug 19, 2020

problem

We can not use Buildx on CodeBuild.

$ docker buildx version
docker: 'buildx' is not a docker command.

To use Buildx,

I must write this script on buildspec.yml.

$ DOCKER_BUILDKIT=1 docker build --platform=local -o . git://github.com/docker/buildx 
$ mkdir -p ~/.docker/cli-plugins
$ mv buildx ~/.docker/cli-plugins/docker-buildx

This leads to longer build hours.

Description of changes:

Building Buildx on CodeBuild base docker images.
If necessary, I add it to other images.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@subinataws
Copy link
Contributor

subinataws commented Aug 22, 2020

Thanks for the PR. Unfortunately, we won't be adding any experimental features. Buildx is still experimental, as per Docker: https://docs.docker.com/buildx/working-with-buildx/

@subinataws subinataws closed this Aug 22, 2020
@whithajess
Copy link

whithajess commented Jan 10, 2021

@kotaroooo0
Note pulling the built version takes 11s vs the 1m29s to build it yourself (from my test):

      - mkdir -p ~/.docker/cli-plugins || true
      - wget -O ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.5.1/buildx-v0.5.1.linux-amd64
      - chmod +x ~/.docker/cli-plugins/docker-buildx

@subinataws
Having buildx installed on the image would help people that want to use experimental features they would need to change the docker config to set experimental = true or set export DOCKER_CLI_EXPERIMENTAL=enabled anyway to use it.

@kotaroooo0
Copy link
Author

@subinataws
Isn't it experimental now?
https://docs.docker.com/buildx/working-with-buildx/

@GaruGaru
Copy link

GaruGaru commented Sep 7, 2021

Looks like buildx doesn't need the experimental flag anymore can we reopen this pull request now ?
cc @kotaroooo0 @subinataws

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.

4 participants