-
Notifications
You must be signed in to change notification settings - Fork 32
Allow using multiplatform images #137
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
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| Docker image with compilers for ruby platform x64-mingw-ucrt | ||
| ------------------ | ||
|
|
||
| This Dockerfile builds compilers for Windows UCRT target. | ||
| It takes the mingw compiler provided by Debian/Ubuntu and configures and compiles them for UCRT. | ||
| Outputs are *.deb files of binutils, gcc and g++. | ||
| Rake-compiler-dock reads them from this image as part of its build process for the x64-mingw-ucrt platform. | ||
|
|
||
| The image is provided for arm64 and amd64 architectures. | ||
| They are built by the following command: | ||
|
|
||
| ```sh | ||
| docker buildx build . -t larskanis/mingw64-ucrt:20.04 --platform linux/arm64,linux/amd64 --push | ||
| ``` | ||
|
|
||
|
|
||
| Create builder instance for two architectures | ||
| ------------------ | ||
|
|
||
| Building with qemu emulation fails currently with a segfault, so that it must be built by a builder instance with at least one remote node for the other architecture. | ||
| Building on native hardware is also much faster (~30 minutes) than on qemu. | ||
| A two-nodes builder requires obviously a ARM and a Intel/AMD device. | ||
| It can be created like this: | ||
|
|
||
| ```sh | ||
| # Make sure the remote instance can be connected | ||
| $ docker -H ssh://isa info | ||
|
|
||
| # Create a new builder with the local instance | ||
| $ docker buildx create --name isayoga | ||
|
|
||
| # Add the remote instance | ||
| $ docker buildx create --name isayoga --append ssh://isa | ||
|
|
||
| # They are inactive from the start | ||
| $ docker buildx ls | ||
| NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS | ||
| isayoga docker-container | ||
| \_ isayoga0 \_ unix:///var/run/docker.sock inactive | ||
| \_ isayoga1 \_ ssh://isa inactive | ||
| default* docker | ||
| \_ default \_ default running v0.13.2 linux/arm64 | ||
|
|
||
| # Bootstrap the instances | ||
| $ docker buildx inspect --bootstrap --builder isayoga | ||
|
|
||
| # Set the new builder as default | ||
| $ docker buildx use isayoga | ||
|
|
||
| # Now it should be default and in state "running" | ||
| $ docker buildx ls | ||
| NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS | ||
| isayoga* docker-container | ||
| \_ isayoga0 \_ unix:///var/run/docker.sock running v0.18.2 linux/arm64 | ||
| \_ isayoga1 \_ ssh://isa running v0.18.2 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386 | ||
| default docker | ||
| \_ default \_ default running v0.13.2 linux/arm64 | ||
| ``` |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.