docker-code-server/root/etc/services.d/code-server/run

26 lines
506 B
Plaintext
Raw Normal View History

2019-06-24 18:03:06 +00:00
#!/usr/bin/with-contenv bash
2019-06-24 19:27:16 +00:00
if [ -n "${PASSWORD}" ]; then
2019-10-24 20:28:48 +00:00
AUTH="password"
2019-06-24 19:27:16 +00:00
else
2019-10-24 20:28:48 +00:00
AUTH="none"
2019-06-24 19:27:16 +00:00
echo "starting with no password"
fi
2020-05-20 03:06:47 +00:00
if [ -z ${PROXY_DOMAIN+x} ]; then
PROXY_DOMAIN_ARG=""
else
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
fi
2019-06-24 19:27:16 +00:00
2019-06-24 18:03:06 +00:00
exec \
2019-06-24 19:27:16 +00:00
s6-setuidgid abc \
2020-05-18 00:40:11 +00:00
/usr/bin/code-server \
2020-04-29 22:45:31 +00:00
--bind-addr 0.0.0.0:8443 \
2019-10-24 19:51:46 +00:00
--user-data-dir /config/data \
--extensions-dir /config/extensions \
2019-06-24 19:27:16 +00:00
--disable-telemetry \
2019-10-24 20:28:48 +00:00
--auth "${AUTH}" \
2020-05-29 14:25:32 +00:00
"${PROXY_DOMAIN_ARG}" \
2019-06-24 19:27:16 +00:00
/config/workspace