Migrate to s6v3

This commit is contained in:
TheSpad 2022-09-12 10:33:26 +01:00
parent 2dad5bee56
commit 8cd110f704
No known key found for this signature in database
GPG Key ID: 08F06191F4587860
29 changed files with 37 additions and 33 deletions

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy-cd65f39a-ls39 as buildstage
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy as buildstage
ARG XRDP_PULSE_VERSION=v0.6
@ -52,7 +52,7 @@ RUN \
FROM ghcr.io/linuxserver/docker-compose:amd64-latest as compose
# runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy-cd65f39a-ls39
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
# set version label
ARG BUILD_DATE
@ -84,6 +84,7 @@ RUN \
libxfixes3 \
libxml2 \
libxrandr2 \
netcat \
openssh-client \
pulseaudio \
software-properties-common \

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy-cd65f39a-ls39 as buildstage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy as buildstage
ARG XRDP_PULSE_VERSION=v0.6
@ -52,7 +52,7 @@ RUN \
FROM ghcr.io/linuxserver/docker-compose:arm64v8-latest as compose
# runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy-cd65f39a-ls39
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
# set version label
ARG BUILD_DATE
@ -81,6 +81,7 @@ RUN \
libxfixes3 \
libxml2 \
libxrandr2 \
netcat \
openssh-client \
pulseaudio \
software-properties-common \

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy-cd65f39a-ls39 as buildstage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy as buildstage
ARG XRDP_PULSE_VERSION=v0.6
@ -52,7 +52,7 @@ RUN \
FROM ghcr.io/linuxserver/docker-compose:arm32v7-latest as compose
# runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy-cd65f39a-ls39
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy
# set version label
ARG BUILD_DATE
@ -81,6 +81,7 @@ RUN \
libxfixes3 \
libxml2 \
libxrandr2 \
netcat \
openssh-client \
pulseaudio \
software-properties-common \

View File

@ -1,9 +0,0 @@
#!/usr/bin/with-contenv bash
mkdir -p /var/run/xrdp || exit 1
chown root:xrdp /var/run/xrdp || exit 1
chmod 2775 /var/run/xrdp || exit 1
mkdir -p /var/run/xrdp/sockdir || exit 1
chown root:xrdp /var/run/xrdp/sockdir || exit 1
chmod 3777 /var/run/xrdp/sockdir || exit 1

View File

@ -1,12 +0,0 @@
#!/usr/bin/with-contenv bash
if [ ! -f "/keylock" ]; then
cd /etc/xrdp
xrdp-keygen xrdp
rm -f /etc/xrdp/*.pem
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
-keyout /etc/xrdp/key.pem \
-out /etc/xrdp/cert.pem \
-subj "/C=US/ST=CA/L=Carlsbad/O=Linuxserver.io/OU=LSIO Server/CN=*"
touch /keylock
fi

View File

@ -1,5 +1,24 @@
#!/usr/bin/with-contenv bash
mkdir -p /var/run/xrdp || exit 1
chown root:xrdp /var/run/xrdp || exit 1
chmod 2775 /var/run/xrdp || exit 1
mkdir -p /var/run/xrdp/sockdir || exit 1
chown root:xrdp /var/run/xrdp/sockdir || exit 1
chmod 3777 /var/run/xrdp/sockdir || exit 1
if [ ! -f "/keylock" ]; then
cd /etc/xrdp
xrdp-keygen xrdp
rm -f /etc/xrdp/*.pem
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
-keyout /etc/xrdp/key.pem \
-out /etc/xrdp/cert.pem \
-subj "/C=US/ST=CA/L=Carlsbad/O=Linuxserver.io/OU=LSIO Server/CN=*"
touch /keylock
fi
if [ ! -e /lock.file ]; then
# give abc a sudo shell
chsh abc -s /bin/bash

View File

@ -0,0 +1 @@
oneshot

View File

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

View File

@ -0,0 +1 @@
oneshot

View File

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

View File

@ -0,0 +1 @@
4

View File

@ -4,6 +4,6 @@
fdmove -c 2 1
# Notify service manager when xrdp is up
s6-notifyoncheck -w 500 -c "true &>/dev/null </dev/tcp/127.0.0.1/3350"
s6-notifyoncheck -w 500 -c "nc -z 127.0.0.1 3350"
/usr/sbin/xrdp-sesman --nodaemon

View File

@ -0,0 +1 @@
longrun

View File

@ -4,10 +4,7 @@
fdmove -c 2 1
# Notify service manager when xrdp is up
s6-notifyoncheck -w 500 -c "true &>/dev/null </dev/tcp/127.0.0.1/3389"
# Wait until other services are running
if { s6-svwait -t 10000 -U /var/run/s6/services/xrdp-sesman/ }
s6-notifyoncheck -w 500 -c "nc -z 127.0.0.1 3389"
# set env
s6-env DISPLAY=:1

View File

@ -0,0 +1 @@
longrun

View File

@ -1 +0,0 @@
3