mirror of
https://github.com/linuxserver/docker-code-server
synced 2025-06-26 18:27:40 +00:00
31 lines
595 B
Plaintext
31 lines
595 B
Plaintext
#!/usr/bin/with-contenv bash
|
|
|
|
if [ -n "${PASSWORD}" ]; then
|
|
AUTH="password"
|
|
else
|
|
AUTH="none"
|
|
echo "starting with no password"
|
|
fi
|
|
|
|
if [ -n "${SSL_KEY}" ] && [ -n "${SSL_CERT}" ]; then
|
|
SSL_CERT="--cert ${SSL_CERT}"
|
|
SSL_KEY="--cert-key ${SSL_KEY}"
|
|
else
|
|
echo "Running insecurely on HTTP."
|
|
SSL_CERT=""
|
|
SSL_KEY=""
|
|
fi
|
|
|
|
exec \
|
|
s6-setuidgid abc \
|
|
/usr/bin/code-server \
|
|
--port 8443 \
|
|
--user-data-dir /config/data \
|
|
--extensions-dir /config/extensions \
|
|
--disable-telemetry \
|
|
--disable-updates \
|
|
--auth "${AUTH}" \
|
|
"${SSL_CERT}" \
|
|
"${SSL_KEY}" \
|
|
/config/workspace
|