[build] Cross compile docker images#128272
Merged
jbudz merged 15 commits intoelastic:mainfrom Mar 23, 2022
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This reverts commit 621780e.
Contributor
|
Pinging @elastic/kibana-operations (Team:Operations) |
spalger
approved these changes
Mar 23, 2022
Contributor
spalger
left a comment
There was a problem hiding this comment.
Ran the build on a remote-dev instance, loaded the arm64 build and the aarch64 docker image to a graviton instance and they both seemed to work great. LGTM
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Contributor
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
Contributor
|
@spalger @jbudz the change in this PR force to use buildx always even though you do not want to cross compile Docker images other than x86_64 cause the following error |
Contributor
Author
|
@kuisathaverat I have a fix up at #128560. |
Contributor
|
On our end, we have included buildx in our Kibana Docker image builder on Friday |
jbudz
added a commit
to jbudz/kibana
that referenced
this pull request
Apr 1, 2022
* [build] Cross compile docker images * typo * debug * Revert "[build] Cross compile docker images" This reverts commit 621780e. * revert * support docker-cross-compile flag * fix types/tests * fix more tests * download cloud dependencies based on cross compile flag * fix array * fix more tests
jbudz
added a commit
that referenced
this pull request
Apr 3, 2022
* [7.17] [build] Cross compile docker images (#128272) * [build] Cross compile docker images * typo * debug * Revert "[build] Cross compile docker images" This reverts commit 621780e. * revert * support docker-cross-compile flag * fix types/tests * fix more tests * download cloud dependencies based on cross compile flag * fix array * fix more tests * rm extra file
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a new flag to
scripts/build,--docker-cross-compile. This flag will attempt to create docker images for both amd64 and arm64 using docker's buildx environment - https://docs.docker.com/buildx/working-with-bux/.The primary use case we are trying to support is building ARM64 images from AMD64. We use GCP on CI, and GCP does not support ARM architectures yet.
By default this is off to maintain backwards compatibility with our current build workflow. QEMU needs to be setup on the local environment to support cross compilation, which is outside the scope of our build scripts.
TODO
Testing