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

enable cross-platform docker image generation via docker buildx #11

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

missinglink
Copy link
Member

As discussed in pelias/docker#264 this PR:

  • switches the default docker builds to use docker buildx instead of docker build
  • changes our default build strategy to cross-compile linux/amd64,linux/arm64,linux/arm/v7
  • allows the target platforms to be modified via the ENV var DOCKER_BUILD_PLATFORMS

ref: https://docs.docker.com/build/buildx/multiplatform-images/

cc @ddelange

replaces branch buildx: master...buildx

Copy link

@ddelange ddelange left a comment

Choose a reason for hiding this comment

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

nice one, and thanks for the cc!

@missinglink
Copy link
Member Author

I'm going to merge this today in order to get work on this feature moving again.

In order to avoid breaking things I've set an organisation-wide variable which sets the builds to 'classic' mode, this can be overridden on a per-repo basis & once we have everything working we can remove the variable at the org level.

Screenshot 2023-11-30 at 11 53 52

@missinglink missinglink merged commit 199fea6 into master Nov 30, 2023
@missinglink missinglink deleted the multiarch branch November 30, 2023 10:57
@missinglink
Copy link
Member Author

In order to test this feature on any repo we just need to set:

DOCKER_BUILD_DEFAULT_PLATFORMS='linux/amd64,linux/arm64,linux/arm/v7'

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.

2 participants