Skip to content

Commit 1d7ebdb

Browse files
committed
Move description to create a dual host builder instance to CONTRIBUTING.md
And add a buildkit config which disables the garbage collection of the cache. Our images are too many and too fat, so that it gets deleted half way otherwise.
1 parent e9b2330 commit 1d7ebdb

File tree

3 files changed

+45
-44
lines changed

3 files changed

+45
-44
lines changed

CONTRIBUTING.md

+43
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,46 @@ docker buildx create --use --driver=docker-container
5353
bundle exec rake build
5454
```
5555

56+
57+
### Create builder instance for two architectures
58+
59+
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.
60+
Building on native hardware is also much faster (~45 minutes) than on qemu.
61+
A two-nodes builder requires obviously a ARM and a Intel/AMD device.
62+
It can be created like this:
63+
64+
```sh
65+
# Make sure the remote instance can be connected
66+
$ docker -H ssh://isa info
67+
68+
# Create a new builder with the local instance
69+
# Disable the garbage collector by the config file
70+
$ docker buildx create --name isayoga --config build/buildkitd.toml
71+
72+
# Add the remote instance
73+
$ docker buildx create --name isayoga --config build/buildkitd.toml --append ssh://isa
74+
75+
# They are inactive from the start
76+
$ docker buildx ls
77+
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
78+
isayoga docker-container
79+
\_ isayoga0 \_ unix:///var/run/docker.sock inactive
80+
\_ isayoga1 \_ ssh://isa inactive
81+
default* docker
82+
\_ default \_ default running v0.13.2 linux/arm64
83+
84+
# Bootstrap the instances
85+
$ docker buildx inspect --bootstrap --builder isayoga
86+
87+
# Set the new builder as default
88+
$ docker buildx use isayoga
89+
90+
# Now it should be default and in state "running"
91+
$ docker buildx ls
92+
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
93+
isayoga* docker-container
94+
\_ isayoga0 \_ unix:///var/run/docker.sock running v0.18.2 linux/arm64
95+
\_ isayoga1 \_ ssh://isa running v0.18.2 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386
96+
default docker
97+
\_ default \_ default running v0.13.2 linux/arm64
98+
```

build/buildkitd.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[worker.oci]
2+
gc = false

mingw64-ucrt/README.md

-44
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,3 @@ They are built by the following command:
1212
```sh
1313
docker buildx build . -t larskanis/mingw64-ucrt:20.04 --platform linux/arm64,linux/amd64 --push
1414
```
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)