mirror of
https://github.com/linuxserver/docker-baseimage-rdesktop.git
synced 2026-02-20 08:39:58 +08:00
Migrate to s6v3
This commit is contained in:
parent
2dad5bee56
commit
8cd110f704
@ -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 \
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
19
root/etc/cont-init.d/30-config → root/etc/s6-overlay/s6-rc.d/init-rdesktop/run
Normal file → Executable file
19
root/etc/cont-init.d/30-config → root/etc/s6-overlay/s6-rc.d/init-rdesktop/run
Normal file → Executable 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
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-rdesktop/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-rdesktop/type
Normal file
@ -0,0 +1 @@
|
||||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-rdesktop/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-rdesktop/up
Normal file
@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-rdesktop/run
|
||||
0
root/etc/cont-init.d/50-gid-video → root/etc/s6-overlay/s6-rc.d/init-video/run
Normal file → Executable file
0
root/etc/cont-init.d/50-gid-video → root/etc/s6-overlay/s6-rc.d/init-video/run
Normal file → Executable file
1
root/etc/s6-overlay/s6-rc.d/init-video/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-video/type
Normal file
@ -0,0 +1 @@
|
||||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-video/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-video/up
Normal file
@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-video/run
|
||||
@ -0,0 +1 @@
|
||||
4
|
||||
@ -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
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-xrdp-sesman/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-xrdp-sesman/type
Normal file
@ -0,0 +1 @@
|
||||
longrun
|
||||
@ -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
|
||||
1
root/etc/s6-overlay/s6-rc.d/svc-xrdp/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-xrdp/type
Normal file
@ -0,0 +1 @@
|
||||
longrun
|
||||
@ -1 +0,0 @@
|
||||
3
|
||||
Loading…
x
Reference in New Issue
Block a user