aws / aws-codebuild-docker-images

Official AWS CodeBuild repository for managed Docker images http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html
Other
1.11k stars 973 forks source link

Docker buildx component missing in amazonlinux2-aarch64-standard:3.0 #640

Closed alexgmin closed 7 months ago

alexgmin commented 1 year ago

Same issue as https://github.com/aws/aws-codebuild-docker-images/issues/625 but for al2, as mentioned here. https://github.com/aws/aws-codebuild-docker-images/issues/625#issuecomment-1546702657

Note that even though https://github.com/aws/aws-codebuild-docker-images/issues/625 is closed, the fix is not working, as indicated in https://github.com/aws/aws-codebuild-docker-images/issues/625#issuecomment-1558485411

Describe the bug A clear and concise description of what the bug is.

Refers to Docker release note:

From Docker Engine version 23.0.0, Buildx is distributed in a separate package: docker-buildx-plugin. In earlier versions, Buildx was included in the docker-ce-cli package. When you upgrade to this version of Docker Engine, make sure you update all packages.

This will result in Dockerfile stated BUILDKIT=1 to fail.

To Reproduce Steps to reproduce the behavior:

  1. Add a new build project and set the image to amazonlinux2-aarch64-standard:3.0
  2. In buildspec.yml, use these lines:
    - export DOCKER_BUILDKIT=1
    - docker build .
  3. Trigger build
  4. See error:
ERROR: BuildKit is enabled but the buildx component is missing or broken.
       Install the buildx component to build images with BuildKit:
       https://docs.docker.com/go/buildx/

Expected behavior This will success in amazonlinux2-aarch64-standard:3.0

Logs N/A

Platform (please complete the following information): N/A

Additional context N/A

larivierec commented 1 year ago

Nice flag, I noticed this the other day and didn't open an issue right away turns out you beat me to it.

Version 0.11.0 of buildx has SBOM integration for frontends so hopefully the PR referenced here gets merged.

BwL1289 commented 1 year ago

is there an update on this? Looks like a review is pending on the PR for months.

SupSkiFun commented 1 year ago

Still occurring on 06SEP2023. Image aws/codebuild/amazonlinux2-aarch64-standard:3.0 Environment type ARM

Without DOCKER_BUILDKIT set you get a warning:

DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/

Updating buildspec.yml with:

env: variables: DOCKER_BUILDKIT: 1

Causes a failure:

ERROR: BuildKit is enabled but the buildx component is missing or broken. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/

Would be nice for this to work without needing to make a symlink or install a package. Thanks.

mhoeper commented 1 year ago

Same here, AWS fixed this in aws-codebuild-docker-images/al2/x86_64/standard, but forgot to fix in aws-codebuild-docker-images/al2/aarch64 /standard...

I hope this to be addressed soon, as this should be easy one.

Taikono-Himazin commented 11 months ago

Please let me know the progress on this. I think this is a big problem and a simple solution, but the fix is too slow.

rjdsgomes commented 10 months ago

Hi, any updates on this?

abhishek-parative commented 9 months ago

Still affected by this issue

vib8m commented 8 months ago

Still facing this. Any updates?

Dylan-AWS commented 7 months ago

This was addressed in #697