From 5a932f5e563fcd96d885efada6d0132369d62cde Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 26 Oct 2022 15:34:10 +0100 Subject: [PATCH] Rebase alpine openbox to 3.16, migrate to s6v3 --- Dockerfile | 3 ++- Dockerfile.aarch64 | 3 ++- Dockerfile.armhf | 3 ++- README.md | 5 +++++ readme-vars.yml | 7 ++++++- root/etc/cont-init.d/56-openboxcopy | 7 ------- .../init-config-end/dependencies.d/init-openboxcopy | 0 .../s6-rc.d/init-openboxcopy/dependencies.d/init-config | 0 root/etc/s6-overlay/s6-rc.d/init-openboxcopy/run | 8 ++++++++ root/etc/s6-overlay/s6-rc.d/init-openboxcopy/type | 1 + root/etc/s6-overlay/s6-rc.d/init-openboxcopy/up | 1 + .../s6-overlay/s6-rc.d/user/contents.d/init-openboxcopy | 0 12 files changed, 27 insertions(+), 11 deletions(-) delete mode 100644 root/etc/cont-init.d/56-openboxcopy create mode 100644 root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-openboxcopy create mode 100644 root/etc/s6-overlay/s6-rc.d/init-openboxcopy/dependencies.d/init-config create mode 100755 root/etc/s6-overlay/s6-rc.d/init-openboxcopy/run create mode 100644 root/etc/s6-overlay/s6-rc.d/init-openboxcopy/type create mode 100644 root/etc/s6-overlay/s6-rc.d/init-openboxcopy/up create mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/init-openboxcopy diff --git a/Dockerfile b/Dockerfile index e8d2e371..43e0f089 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-rdesktop:alpine +FROM ghcr.io/linuxserver/baseimage-rdesktop:3.16 # set version label ARG BUILD_DATE @@ -28,4 +28,5 @@ COPY /root / # ports and volumes EXPOSE 3389 + VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 1bbcfe49..40cd27e1 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-rdesktop:arm64v8-alpine +FROM ghcr.io/linuxserver/baseimage-rdesktop:arm64v8-3.16 # set version label ARG BUILD_DATE @@ -28,4 +28,5 @@ COPY /root / # ports and volumes EXPOSE 3389 + VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 9646d8ea..d48acacd 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-rdesktop:arm32v7-alpine +FROM ghcr.io/linuxserver/baseimage-rdesktop:arm32v7-3.16 # set version label ARG BUILD_DATE @@ -28,4 +28,5 @@ COPY /root / # ports and volumes EXPOSE 3389 + VOLUME /config diff --git a/README.md b/README.md index 463aa1c4..f5bcbc37 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,10 @@ https://github.com/NVIDIA/nvidia-docker We automatically add the necessary environment variable that will utilise all the features available on a GPU on the host. Once nvidia-docker is installed on your host you will need to re/create the docker container with the nvidia container runtime `--runtime=nvidia` and add an environment variable `-e NVIDIA_VISIBLE_DEVICES=all` (can also be set to a specific gpu's UUID, this can be discovered by running `nvidia-smi --query-gpu=gpu_name,gpu_uuid --format=csv` ). NVIDIA automatically mounts the GPU and drivers from your host into the container. +### Arm Devices + +Best effort is made to install tools to allow mounting in /dev/dri on Arm devices. In most cases if /dev/dri exists on the host it should just work. If running a Raspberry Pi 4 be sure to enable `dtoverlay=vc4-fkms-v3d` in your usercfg.txt. + ## Usage Here are some example snippets to help you get started creating a container. @@ -298,6 +302,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **26.10.22:** - Rebase Alpine openbox to 3.16, migrate to s6v3. * **05.03.22:** - Organize tags differently to run Ubuntu at latest LTS, make Alpine latest, add docs about GPU accel. * **05.05.21:** - Reduce default packages to their flavor specific basics. * **05.04.21:** - Add Alpine flavor. diff --git a/readme-vars.yml b/readme-vars.yml index 1abc1159..1ba01723 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -76,7 +76,7 @@ app_setup_block: | The first thing you should do when you login to the container is to change the abc users password by issuing the `passwd` command. **Modern GUI desktop apps (including some flavors terminals) have issues with the latest Docker and syscall compatibility, you can use Docker with the `--security-opt seccomp=unconfined` setting to allow these syscalls or try [podman](https://podman.io/) as they have updated their codebase to support them** - + If you ever lose your password you can always reset it by execing into the container as root: ``` docker exec -it rdesktop passwd abc @@ -102,8 +102,13 @@ app_setup_block: | We automatically add the necessary environment variable that will utilise all the features available on a GPU on the host. Once nvidia-docker is installed on your host you will need to re/create the docker container with the nvidia container runtime `--runtime=nvidia` and add an environment variable `-e NVIDIA_VISIBLE_DEVICES=all` (can also be set to a specific gpu's UUID, this can be discovered by running `nvidia-smi --query-gpu=gpu_name,gpu_uuid --format=csv` ). NVIDIA automatically mounts the GPU and drivers from your host into the container. + ### Arm Devices + + Best effort is made to install tools to allow mounting in /dev/dri on Arm devices. In most cases if /dev/dri exists on the host it should just work. If running a Raspberry Pi 4 be sure to enable `dtoverlay=vc4-fkms-v3d` in your usercfg.txt. + # changelog changelogs: + - { date: "26.10.22:", desc: "Rebase Alpine openbox to 3.16, migrate to s6v3." } - { date: "05.03.22:", desc: "Organize tags differently to run Ubuntu at latest LTS, make Alpine latest, add docs about GPU accel." } - { date: "05.05.21:", desc: "Reduce default packages to their flavor specific basics." } - { date: "05.04.21:", desc: "Add Alpine flavor." } diff --git a/root/etc/cont-init.d/56-openboxcopy b/root/etc/cont-init.d/56-openboxcopy deleted file mode 100644 index 822bf16d..00000000 --- a/root/etc/cont-init.d/56-openboxcopy +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/with-contenv bash - -# default file copies first run -[[ ! -f /config/.config/openbox/menu.xml ]] && \ - mkdir -p /config/.config/openbox && \ - cp /defaults/menu.xml /config/.config/openbox/menu.xml && \ - chown -R abc:abc /config/.config diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-openboxcopy b/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-openboxcopy new file mode 100644 index 00000000..e69de29b diff --git a/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/dependencies.d/init-config b/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/dependencies.d/init-config new file mode 100644 index 00000000..e69de29b diff --git a/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/run b/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/run new file mode 100755 index 00000000..e7504d57 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/run @@ -0,0 +1,8 @@ +#!/usr/bin/with-contenv bash + +# default file copies first run +if [[ ! -f /config/.config/openbox/menu.xml ]]; then + mkdir -p /config/.config/openbox && \ + cp /defaults/menu.xml /config/.config/openbox/menu.xml && \ + chown -R abc:abc /config/.config +fi diff --git a/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/type b/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/type new file mode 100644 index 00000000..3d92b15f --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/type @@ -0,0 +1 @@ +oneshot \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/up b/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/up new file mode 100644 index 00000000..c5a506fb --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-openboxcopy/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-openboxcopy/run \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-openboxcopy b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-openboxcopy new file mode 100644 index 00000000..e69de29b