Skip to content

Commit 250718a

Browse files
committed
fix(image-factory): find the host socket on the lxc path too
tool.sh hands the host's daemon in as /run/cuos-docker.sock now. The disk-image path picks it up in docker_environment.sh, but the lxc branch of create_image.sh pulls, runs and exports on that daemon and returns before updater.sh is ever reached - with the socket gone from the default path it had no daemon left to talk to. Signed-off-by: Simon Walz <contact@simonwalz.de>
1 parent 2cbe3bb commit 250718a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎image-factory/create_image.sh‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ image_version() {
5959
}
6060

6161
export DOCKER_CONTEXT=default
62+
63+
# tool.sh hands the host's daemon in under a name of its own, so that
64+
# /var/run/docker.sock stays free for a dockerd started inside this container -
65+
# updater/docker_environment.sh explains why, and picks the same socket up for
66+
# the disk-image path. The lxc branch below never gets that far: it pulls, runs
67+
# and exports on the host's daemon and returns, so it has to find the socket
68+
# itself. Keep the path in step with docker_environment.sh.
69+
if [[ -S "/run/cuos-docker.sock" ]]; then
70+
export DOCKER_HOST="unix:///run/cuos-docker.sock"
71+
fi
72+
6273
OUTPUT_DIR="/output"
6374

6475
IMAGE_NAME="${IMAGE_NAME:-"image"}"

0 commit comments

Comments
 (0)