@@ -20,8 +20,6 @@ echo "Adding docker systemd timers..."
20
20
sudo cp /tmp/conf/docker/scripts/* /usr/local/bin
21
21
sudo cp /tmp/conf/docker/systemd/docker-* /etc/systemd/system
22
22
sudo chmod +x /usr/local/bin/docker-*
23
- sudo systemctl daemon-reload
24
- sudo systemctl enable docker-gc.timer docker-low-disk-gc.timer
25
23
26
24
echo " Installing docker buildx..."
27
25
DOCKER_CLI_DIR=/usr/libexec/docker/cli-plugins
@@ -47,11 +45,22 @@ sudo cp /tmp/conf/bin/docker-compose /usr/local/bin/docker-compose
47
45
sudo chmod +x /usr/local/bin/docker-compose
48
46
docker-compose version
49
47
48
+ # Writing QEMU container version info to /usr/local/lib/bk-configure-docker.sh.
49
+ # We only pull this image when we build the AMI. It will be run in
50
+ # /usr/local/bin/bk-configure-docker.sh, but it needs to know the image digest
51
+ # to make sure it does not pull in another image instead.
52
+ # NOTE: the executable file is in /usr/local/bin and it sources as file of the
53
+ # same name in /usr/local/lib. These are not the same file.
50
54
# See https://docs.docker.com/build/building/multi-platform/
55
+
56
+ echo Contents of /usr/local/lib/bk-configure-docker.sh:
57
+ cat << 'EOF ' | sudo tee -a /usr/local/lib/bk-configure-docker.sh
51
58
QEMU_BINFMT_VERSION=7.0.0-28
52
59
QEMU_BINFMT_DIGEST=sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55
53
60
QEMU_BINFMT_TAG="qemu-v${QEMU_BINFMT_VERSION}@${QEMU_BINFMT_DIGEST}"
61
+ EOF
62
+ # shellcheck disable=SC1091
63
+ source /usr/local/lib/bk-configure-docker.sh
54
64
sudo mkdir -p /usr/local/lib
55
- echo " QEMU_BINFMT_TAG=\" $QEMU_BINFMT_TAG \" " | sudo tee -a /usr/local/lib/bk-configure-docker.sh
56
65
echo Pulling qemu binfmt for multiarch...
57
66
sudo docker pull " tonistiigi/binfmt:${QEMU_BINFMT_TAG} "
0 commit comments