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

Buildx: Build Cache and Platforms #474

Closed
wants to merge 14 commits into from

Conversation

cimnine
Copy link
Collaborator

@cimnine cimnine commented Mar 14, 2021

Related Issues: #468, #306

TODO

  • investigate error: failed to solve: rpc error: code = Unknown desc = docker exporter does not currently support exporting manifest lists
  • docker-compose up on a Raspberry PI (or other ARM computer)

New Behavior

We were using Docker Buildx in our scripts since a while.
We used it via docker build by exporting the respective ENV var, DOCKER_BUILDKIT=1.

This change switches to using docker buildx commands explicitly.
This allows us to use more advanced features:

  • Exporting and Importing the build cache
  • Cross-compiling for other platforms, e.g. linux/arm64
  • Pushing straight after building (not used in GH Actions)

Contrast to Current Behavior

Currently only the most basic features of Buildx can be used, because Docker does not expose the advanced features through the docker build command.

Discussion: Benefits and Drawbacks

My main hope is that this change speeds up builds. Because the build-cache can be exported, GH Action should be able to restore the build-cache the next time it attempts a build. This should even be true for branch builds, i.e. builds for PRs.

Changes to the Wiki

I don't think that changes are required.

Proposed Release Note Entry

## ARM64 Builds #474

We now build and ship an ARM64 build of the image. This was made possible by switching to the Buildx build system.

Double Check

  • I have read the comments and followed the PR template.
  • I have explained my PR according to the information in the comments.
  • My PR targets the develop branch.

@cimnine cimnine added the maintenance The issue describes a maintenance task, such as upgrading a dependency to a certain version. label Mar 14, 2021
@cimnine cimnine self-assigned this Mar 14, 2021
@cimnine cimnine force-pushed the Buildx branch 4 times, most recently from e504b75 to 9410c87 Compare September 17, 2021 19:37
@cimnine
Copy link
Collaborator Author

cimnine commented Sep 18, 2021

I will re-open this later

@cimnine cimnine closed this Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance The issue describes a maintenance task, such as upgrading a dependency to a certain version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant