mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 16:58:27 -04:00
code-server-docker: allow remote docker setup
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This mod adds docker and docker-compose binaries to code-server.
|
This mod adds docker and docker-compose binaries to code-server.
|
||||||
|
|
||||||
**IMPORTANT NOTE**: For docker access inside code-server, a volume mapping needs to be added for `/var/run/docker.sock:/var/run/docker.sock` in code-server docker run/create/compose.
|
**IMPORTANT NOTE**: For docker access inside code-server, a volume mapping needs to be added for `/var/run/docker.sock:/var/run/docker.sock` in code-server docker run/create/compose. If you'd like to connect to a remote docker service instead, you don't have to map the docker sock; you can either set an env var for `DOCKER_HOST=remoteaddress` or use the docker cli option `-H`.
|
||||||
|
|
||||||
In code-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:code-server-docker` to enable.
|
In code-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:code-server-docker` to enable.
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ if [ -S /var/run/docker.sock ]; then
|
|||||||
fi
|
fi
|
||||||
usermod -aG "${DOCKER_NAME}" abc
|
usermod -aG "${DOCKER_NAME}" abc
|
||||||
fi
|
fi
|
||||||
|
elif [ -n "$DOCKER_HOST" ]; then
|
||||||
|
echo "**** /var/run/docker.sock is not mapped, therefore, docker client will only work with a remote docker service ****"
|
||||||
else
|
else
|
||||||
echo "**** Please map /var/run/docker.sock or docker won't work inside this container ****"
|
echo "**** Please map /var/run/docker.sock for access to docker service on host. Alternatively you can manually define a remote host address with the docker cli option -H ****"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user