diff --git a/Dockerfile b/Dockerfile index 7ca44e4..a5069fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ RUN \ libatomic1 \ nano \ net-tools \ + netcat \ sudo && \ echo "**** install code-server ****" && \ if [ -z ${CODE_RELEASE+x} ]; then \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 0b5d203..01755a0 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -20,6 +20,7 @@ RUN \ libatomic1 \ nano \ net-tools \ + netcat \ sudo && \ echo "**** install code-server ****" && \ if [ -z ${CODE_RELEASE+x} ]; then \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 726acef..304bae3 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -20,6 +20,7 @@ RUN \ libatomic1 \ nano \ net-tools \ + netcat \ sudo && \ echo "**** install code-server ****" && \ if [ -z ${CODE_RELEASE+x} ]; then \ diff --git a/root/etc/s6-overlay/s6-rc.d/svc-code-server/notification-fd b/root/etc/s6-overlay/s6-rc.d/svc-code-server/notification-fd new file mode 100644 index 0000000..e440e5c --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/svc-code-server/notification-fd @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/svc-code-server/run b/root/etc/s6-overlay/s6-rc.d/svc-code-server/run index 689e176..3477d39 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-code-server/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-code-server/run @@ -14,12 +14,13 @@ else fi exec \ - 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}" + s6-notifyoncheck -d -n 7 -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}"