mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-12-23 10:57:43 +01:00
28 lines
787 B
Plaintext
Executable File
28 lines
787 B
Plaintext
Executable File
#!/usr/bin/with-contenv bash
|
|
# shellcheck shell=bash
|
|
|
|
if [[ -n "${PASSWORD}" ]] || [[ -n "${HASHED_PASSWORD}" ]]; then
|
|
AUTH="password"
|
|
else
|
|
AUTH="none"
|
|
echo "starting with no password"
|
|
fi
|
|
|
|
if [[ -z ${PROXY_DOMAIN+x} ]]; then
|
|
PROXY_DOMAIN_ARG=""
|
|
else
|
|
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
|
|
fi
|
|
|
|
exec \
|
|
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8443" \
|
|
s6-setuidgid abc \
|
|
/app/code-server/bin/code-server \
|
|
--bind-addr 0.0.0.0:8443 \
|
|
--user-data-dir /config/data \
|
|
--extensions-dir /config/extensions \
|
|
--disable-telemetry \
|
|
--auth "${AUTH}" \
|
|
"${PROXY_DOMAIN_ARG}" \
|
|
"${DEFAULT_WORKSPACE:-/config/workspace}"
|