mirror of
https://github.com/linuxserver/docker-kasm.git
synced 2026-01-23 02:24:38 +00:00
Migrate to s6v3
This commit is contained in:
parent
b2bd92b66c
commit
aef3a72acc
29 changed files with 52 additions and 42 deletions
|
|
@ -1,4 +1,4 @@
|
|||
FROM ghcr.io/linuxserver/baseimage-alpine:3.16-fb0ed076-ls25
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.16
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
|
|
@ -9,6 +9,7 @@ LABEL maintainer="thelamer"
|
|||
|
||||
# Env
|
||||
ENV DOCKER_TLS_CERTDIR=""
|
||||
ENV TINI_SUBREAPER=true
|
||||
|
||||
# Container setup
|
||||
RUN \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.16-fb0ed076-ls25
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.16
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
|
|
@ -9,6 +9,7 @@ LABEL maintainer="thelamer"
|
|||
|
||||
# Env
|
||||
ENV DOCKER_TLS_CERTDIR=""
|
||||
ENV TINI_SUBREAPER=true
|
||||
|
||||
# Container setup
|
||||
RUN \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.16-fb0ed076-ls25
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.16
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
|
|
|
|||
|
|
@ -241,4 +241,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
|||
|
||||
## Versions
|
||||
|
||||
* **23.09.22:** - Migrate to s6v3.
|
||||
* **02.07.22:** - Initial Release.
|
||||
|
|
|
|||
|
|
@ -91,4 +91,5 @@ app_setup_block: |
|
|||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "23.09.22:", desc: "Migrate to s6v3." }
|
||||
- { date: "02.07.22:", desc: "Initial Release." }
|
||||
|
|
|
|||
0
root-armhf/etc/cont-init.d/30-disabled → root-armhf/etc/s6-overlay/s6-rc.d/init-config-kasm/run
Normal file → Executable file
0
root-armhf/etc/cont-init.d/30-disabled → root-armhf/etc/s6-overlay/s6-rc.d/init-config-kasm/run
Normal file → Executable file
1
root-armhf/etc/s6-overlay/s6-rc.d/init-config-kasm/type
Normal file
1
root-armhf/etc/s6-overlay/s6-rc.d/init-config-kasm/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root-armhf/etc/s6-overlay/s6-rc.d/init-config-kasm/up
Normal file
1
root-armhf/etc/s6-overlay/s6-rc.d/init-config-kasm/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-config-kasm/run
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Create directories
|
||||
if [ ! -d "/opt/docker" ]; then
|
||||
mkdir -p /opt/docker
|
||||
fi
|
||||
|
||||
# Login to Dockerhub
|
||||
if [ ! -z "${DOCKER_HUB_USERNAME}" ]; then
|
||||
docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||
fi
|
||||
|
||||
# Generate self cert for wizard
|
||||
if [ ! -f "/opt/kasm/certs/kasm_wizard.crt" ]; then
|
||||
mkdir -p /opt/kasm/certs
|
||||
openssl req -x509 -nodes -days 1825 -newkey rsa:2048 \
|
||||
-keyout /opt/kasm/certs/kasm_wizard.key \
|
||||
-out /opt/kasm/certs/kasm_wizard.crt \
|
||||
-subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=$(hostname)/emailAddress=none@none.none"
|
||||
fi
|
||||
20
root/etc/s6-overlay/s6-rc.d/init-config-kasm/run
Executable file
20
root/etc/s6-overlay/s6-rc.d/init-config-kasm/run
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Create directories
|
||||
if [ ! -d "/opt/docker" ]; then
|
||||
mkdir -p /opt/docker
|
||||
fi
|
||||
|
||||
# Login to Dockerhub
|
||||
if [ -n "${DOCKER_HUB_USERNAME}" ]; then
|
||||
docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||
fi
|
||||
|
||||
# Generate self cert for wizard
|
||||
if [ ! -f "/opt/kasm/certs/kasm_wizard.crt" ]; then
|
||||
mkdir -p /opt/kasm/certs
|
||||
openssl req -x509 -nodes -days 1825 -newkey rsa:2048 \
|
||||
-keyout /opt/kasm/certs/kasm_wizard.key \
|
||||
-out /opt/kasm/certs/kasm_wizard.crt \
|
||||
-subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=$(hostname)/emailAddress=none@none.none"
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config-kasm/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config-kasm/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config-kasm/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config-kasm/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-config-kasm/run
|
||||
14
root/etc/s6-overlay/s6-rc.d/svc-docker/run
Executable file
14
root/etc/s6-overlay/s6-rc.d/svc-docker/run
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
_term() {
|
||||
if [ -f "/opt/kasm/bin/stop" ]; then
|
||||
echo "Caught SIGTERM signal!"
|
||||
echo "Stopping Kasm Containers"
|
||||
/opt/kasm/bin/stop
|
||||
pid=$(pidof stop)
|
||||
# terminate when the stop process dies
|
||||
tail --pid=${pid} -f /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
exec /usr/local/bin/dockerd-entrypoint.sh -l error --data-root /opt/docker
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-docker/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-docker/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
longrun
|
||||
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
# Wait for docker to be up
|
||||
while true; do
|
||||
if [ -S "/var/run/docker.sock" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
if [ -S "/var/run/docker.sock" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Don't do anything if wizard is disabled
|
||||
if [ -f "/opt/NO_WIZARD" ]; then
|
||||
sleep infinity
|
||||
sleep infinity
|
||||
fi
|
||||
|
||||
cd /wizard
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-kasm-wizard/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-kasm-wizard/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
longrun
|
||||
0
root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-docker
Normal file
0
root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-docker
Normal file
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
_term() {
|
||||
if [ -f "/opt/kasm/bin/stop" ]; then
|
||||
echo "Caught SIGTERM signal!"
|
||||
echo "Stopping Kasm Containers"
|
||||
/opt/kasm/bin/stop
|
||||
pid=$(pidof stop)
|
||||
# terminate when the stop process dies
|
||||
tail --pid=${pid} -f /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
exec /usr/local/bin/dockerd-entrypoint.sh -l error --data-root /opt/docker
|
||||
Loading…
Add table
Add a link
Reference in a new issue