Use Workspace var
This commit is contained in:
parent
59b4f07cae
commit
c899ac69a4
@ -1,8 +1,11 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
mkdir -p /config/{.vscode-headless,.config,.ssh}
|
mkdir -p /config/{.vscode-headless,.config,.ssh,workspace}
|
||||||
mkdir -p /run/dbus
|
|
||||||
|
if [ ! -d "${DEFAULT_WORKSPACE}" ];then
|
||||||
|
echo -n "/config/workspace" >/run/s6/container_environment/DEFAULT_WORKSPACE
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
||||||
echo "setting up sudo access"
|
echo "setting up sudo access"
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
until [[ -e /run/dbus/system_bus_socket ]]; do
|
env | sort > /svc-env
|
||||||
sleep 1s
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$CONNECTION_SECRET" ]; then
|
if [ -n "$CONNECTION_SECRET" ]; then
|
||||||
CODE_LOCAL_ARGS="${CODE_LOCAL_ARGS} --connection-token-file ${CONNECTION_SECRET}"
|
CODE_LOCAL_ARGS="${CODE_LOCAL_ARGS} --connection-token-file ${CONNECTION_SECRET}"
|
||||||
@ -17,6 +15,7 @@ fi
|
|||||||
|
|
||||||
exec \
|
exec \
|
||||||
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8000" \
|
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8000" \
|
||||||
|
cd "$DEFAULT_WORKSPACE" \
|
||||||
s6-setuidgid abc \
|
s6-setuidgid abc \
|
||||||
/usr/local/bin/code-server serve-local \
|
/usr/local/bin/code-server serve-local \
|
||||||
--accept-server-license-terms\
|
--accept-server-license-terms\
|
||||||
|
@ -6,9 +6,10 @@ until [[ -e /run/dbus/system_bus_socket ]]; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
exec \
|
exec \
|
||||||
|
cd "$DEFAULT_WORKSPACE" \
|
||||||
s6-setuidgid abc \
|
s6-setuidgid abc \
|
||||||
/usr/local/bin/code-server serve \
|
/usr/local/bin/code-server serve \
|
||||||
--accept-server-license-terms \
|
--accept-server-license-terms \
|
||||||
--random-name \
|
--random-name \
|
||||||
--disable-telemetry\
|
--disable-telemetry \
|
||||||
${CODE_ARGS}
|
${CODE_ARGS} || exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user