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

Build docker image with buildx to support new Dockerfile syntax #21960

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented Mar 1, 2024

Fixes: mozilla/addons#9528

Description

Explicitly use docker buildx build to ensure buildkit flags and syntax are available during local/ci builds. We run the make command in CI to ensure the same command is executed in both environments. This is also essentially compatible with that is executed in the github action build.

Context

#21914 broke the docker build in circleci, this went unnoticed because the build only runs on master and the command was simple and using the same docker build as we have in the locale make command build_docker_image. There were differences in arguments, but it was assumed that docker build would support buildx context... that was wrong.

Testing

You can test by adding the -build-image job to a workflow. It is enabled in this commit: d8a8420731e2b4ca7d83fbb98befc8f8817e5478

Which will be removed before merging.

@KevinMind KevinMind force-pushed the ADDSRV-744 branch 3 times, most recently from 8e45574 to d8a8420 Compare March 1, 2024 13:08
@KevinMind KevinMind requested a review from eviljeff March 1, 2024 13:14
@KevinMind KevinMind marked this pull request as ready for review March 1, 2024 13:14
Comment on lines 661 to 662
# Uncomment if you want to test the docker build
- build-image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's already uncommented though. - is this comment accurate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanted to confirm it actually works. I'll remove the commit reverting back to commented out before merging.

@KevinMind KevinMind changed the title Test build without push. Build docker image with buildx to support new Dockerfile syntax Mar 4, 2024
@KevinMind KevinMind requested a review from eviljeff March 4, 2024 09:15
@KevinMind KevinMind merged commit 86d0f1f into master Mar 5, 2024
13 checks passed
@KevinMind KevinMind deleted the ADDSRV-744 branch March 5, 2024 13:26
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.

Fix Docker build
2 participants