File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,12 @@ trap '[[ $? = 0 ]] && on_exit' EXIT
26
26
exec > >( tee -a /var/log/elastic-stack.log | logger -t user-data -s 2> /dev/console) 2>&1
27
27
28
28
29
- echo Reading variables from AMI creation...
29
+ echo Sourcing /usr/local/lib/bk-configure-docker.sh...
30
+ echo This file is written by the scripts in packer/scripts.
31
+ echo Note that the path is /usr/local/lib, not /usr/local/bin.
32
+ echo Contents of /usr/local/lib/bk-configure-docker.sh:
30
33
# shellcheck disable=SC1091
31
- source / usr/local/lib/bk-configure-docker.sh
34
+ tee /dev/stderr < / usr/local/lib/bk-configure-docker.sh | source /dev/stdin
32
35
33
36
if [[ " ${DOCKER_USERNS_REMAP:- false} " == " true" ]]; then
34
37
echo Configuring user namespace remapping...
Original file line number Diff line number Diff line change @@ -47,11 +47,22 @@ sudo cp /tmp/conf/bin/docker-compose /usr/local/bin/docker-compose
47
47
sudo chmod +x /usr/local/bin/docker-compose
48
48
docker-compose version
49
49
50
+ # Writing QEMU container version info to /usr/local/lib/bk-configure-docker.sh.
51
+ # We only pull this image when we build the AMI. It will be run in
52
+ # /usr/local/bin/bk-configure-docker.sh, but it needs to know the image digest
53
+ # to make sure it does not pull in another image instead.
54
+ # NOTE: the executable file is in /usr/local/bin and it sources as file of the
55
+ # same name in /usr/local/lib. These are not the same file.
50
56
# See https://docs.docker.com/build/building/multi-platform/
57
+
58
+ echo Contents of /usr/local/lib/bk-configure-docker.sh:
59
+ cat << 'EOF ' | sudo tee -a /usr/local/lib/bk-configure-docker.sh
51
60
QEMU_BINFMT_VERSION=7.0.0-28
52
61
QEMU_BINFMT_DIGEST=sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55
53
62
QEMU_BINFMT_TAG="qemu-v${QEMU_BINFMT_VERSION}@${QEMU_BINFMT_DIGEST}"
63
+ EOF
64
+ # shellcheck disable=SC1091
65
+ source /usr/local/lib/bk-configure-docker.sh
54
66
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
67
echo Pulling qemu binfmt for multiarch...
57
68
sudo docker pull " tonistiigi/binfmt:${QEMU_BINFMT_TAG} "
You can’t perform that action at this time.
0 commit comments