Looking at this code, I don't know what it is doing because there isn't a docker.sock in the container.
postBuild..sh directly cats code into the container to talk to /var/host-run/docker.sock. The container doesn't actually have that socket in it. This code doesn't create that
Environment
Host: Linux
Version: current version as of 2024/08/04
OS: Ubuntu
Actual socket: /var/run/docker.sock
Code
postBuild.sh
cat <<EOM \| sudo tee /etc/profile.d/docker-in-docker.sh > /dev/null
--
if ! groups workbench \| grep docker > /dev/null; then
docker_gid=\$(stat -c %g /var/host-run/docker.sock)
sudo groupadd -g \$docker_gid docker
sudo usermod -aG docker workbench
fi
EOM
logs
stat: cannot statx '/var/host-run/docker.sock': No such file or directory
groupadd: invalid group ID 'docker'
usermod: group 'docker' does not exist
Traceback (most recent call last):
Looking at this code, I don't know what it is doing because there isn't a docker.sock in the container.
postBuild..sh directly cats code into the container to talk to
/var/host-run/docker.sock
. The container doesn't actually have that socket in it. This code doesn't create thatEnvironment
Host: Linux Version: current version as of 2024/08/04 OS: Ubuntu Actual socket: /var/run/docker.sock
Code
postBuild.sh
logs