Migrate to s6v3

This commit is contained in:
TheSpad 2022-09-23 19:21:27 +01:00
parent b2bd92b66c
commit aef3a72acc
No known key found for this signature in database
GPG key ID: 08F06191F4587860
29 changed files with 52 additions and 42 deletions

View file

@ -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 \

View file

@ -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 \

View file

@ -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

View file

@ -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.

View file

@ -91,4 +91,5 @@ app_setup_block: |
# changelog
changelogs:
- { date: "23.09.22:", desc: "Migrate to s6v3." }
- { date: "02.07.22:", desc: "Initial Release." }

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-config-kasm/run

View file

@ -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

View 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

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-config-kasm/run

View 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

View file

@ -0,0 +1 @@
longrun

View file

@ -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

View file

@ -0,0 +1 @@
longrun

View 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