Skip to content

Commit 26eaa65

Browse files
committed
Add a README for creating the mingw64-ucrt docker image
1 parent ae530dc commit 26eaa65

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

mingw64-ucrt/README.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Docker image with compilers for ruby platform x64-mingw-ucrt
2+
------------------
3+
4+
This Dockerfile builds compilers for Windows UCRT target.
5+
It takes the mingw compiler provided by Debian/Ubuntu and configures and compiles them for UCRT.
6+
Outputs are *.deb files of binutils, gcc and g++.
7+
Rake-compiler-dock reads them from this image as part of its build process for the x64-mingw-ucrt platform.
8+
9+
The image is provided for arm64 and amd64 architectures.
10+
They are built by the following command:
11+
12+
```sh
13+
docker buildx build . -t larskanis/mingw64-ucrt:20.04 --platform linux/arm64,linux/amd64 --push
14+
```
15+
16+
17+
Create builder instance for two architectures
18+
------------------
19+
20+
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.
21+
Building on native hardware is also much faster (~30 minutes) than on qemu.
22+
A two-nodes builder requires obviously a ARM and a Intel/AMD device.
23+
It can be created like this:
24+
25+
```sh
26+
# Make sure the remote instance can be connected
27+
$ docker -H ssh://isa info
28+
29+
# Create a new builder with the local instance
30+
$ docker buildx create --name isayoga
31+
32+
# Add the remote instance
33+
$ docker buildx create --name isayoga --append ssh://isa
34+
35+
# They are inactive from the start
36+
$ docker buildx ls
37+
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
38+
isayoga docker-container
39+
\_ isayoga0 \_ unix:///var/run/docker.sock inactive
40+
\_ isayoga1 \_ ssh://isa inactive
41+
default* docker
42+
\_ default \_ default running v0.13.2 linux/arm64
43+
44+
# Bootstrap the instances
45+
$ docker buildx inspect --bootstrap --builder isayoga
46+
47+
# Set the new builder as default
48+
$ docker buildx use isayoga
49+
50+
# Now it should be default and in state "running"
51+
$ docker buildx ls
52+
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
53+
isayoga* docker-container
54+
\_ isayoga0 \_ unix:///var/run/docker.sock running v0.18.2 linux/arm64
55+
\_ isayoga1 \_ ssh://isa running v0.18.2 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386
56+
default docker
57+
\_ default \_ default running v0.13.2 linux/arm64
58+
```

0 commit comments

Comments
 (0)