From d75859ecb94df3be5d89af5950fa34ca1a3d2ef5 Mon Sep 17 00:00:00 2001 From: thelamer Date: Tue, 6 Aug 2024 13:11:10 -0400 Subject: [PATCH] combine env on init for xrdp display vars --- Dockerfile | 11 ++++++----- Dockerfile.aarch64 | 7 ++++--- README.md | 8 ++------ readme-vars.yml | 8 ++------ root/defaults/startwm.sh | 5 +++++ 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 917b8be..563a54e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-ubuntu:noble as buildstage +FROM ghcr.io/linuxserver/baseimage-ubuntu:noble AS buildstage ARG XRDP_PULSE_VERSION=v0.7 ARG DEBIAN_FRONTEND="noninteractive" @@ -46,7 +46,7 @@ RUN \ cp -ax ../xrdp_*.deb /buildout/xrdp.deb # docker compose -FROM ghcr.io/linuxserver/docker-compose:amd64-latest as compose +FROM ghcr.io/linuxserver/docker-compose:amd64-latest AS compose # runtime stage FROM ghcr.io/linuxserver/baseimage-ubuntu:noble @@ -62,9 +62,8 @@ COPY --from=buildstage /buildout/ / COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin/docker-compose #Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker -ENV NVIDIA_DRIVER_CAPABILITIES=all - -ARG DEBIAN_FRONTEND="noninteractive" +ENV NVIDIA_DRIVER_CAPABILITIES=all \ + HOME=/config RUN \ echo "**** enable locales ****" && \ @@ -79,6 +78,8 @@ RUN \ apt-transport-https \ ca-certificates \ dbus-x11 \ + fonts-noto-color-emoji \ + fonts-noto-core \ gawk \ gnupg2 \ libfuse2 \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index a48f8a8..5e28758 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -62,9 +62,8 @@ COPY --from=buildstage /buildout/ / COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin/docker-compose #Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker -ENV NVIDIA_DRIVER_CAPABILITIES=all - -ARG DEBIAN_FRONTEND="noninteractive" +ENV NVIDIA_DRIVER_CAPABILITIES=all \ + HOME=/config RUN \ echo "**** enable locales ****" && \ @@ -79,6 +78,8 @@ RUN \ apt-transport-https \ ca-certificates \ dbus-x11 \ + fonts-noto-color-emoji \ + fonts-noto-core \ gawk \ gnupg2 \ libfuse2 \ diff --git a/README.md b/README.md index 23f4d16..407b72b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ All application settings are passed via environment variables: | Variable | Description | | :----: | --- | | LC_ALL | Set the Language for the container to run as IE `fr_FR.UTF-8` `ar_AE.UTF-8` | -| NO_DECOR | If set the application will run without window borders for use as a PWA. (Decor can be enabled and disabled with Ctrl+Shift+d) | +| NO_DECOR | If set the application will run without window borders. (Decor can be enabled and disabled with Ctrl+Shift+d) | | NO_FULL | Do not autmatically fullscreen applications when using openbox. | ## Language Support - Internationalization @@ -53,7 +53,7 @@ A list of linuxserver.io supported applications is located [HERE](https://github Included in these base images is a simple [Openbox DE](http://openbox.org/) and the accompanying logic needed to launch a single application. Lets look at the bare minimum needed to create an application container starting with a Dockerfile: ``` -FROM ghcr.io/linuxserver/baseimage-rdesktop:3.20 +FROM ghcr.io/linuxserver/baseimage-rdesktop:alpine320 RUN apk add --no-cache firefox COPY /root / ``` @@ -141,10 +141,6 @@ This feature only supports **Open Source** GPU drivers: | AMD | AMDGPU, Radeon, and ATI drivers for AMD dedicated or APU chipsets | | NVIDIA | nouveau2 drivers only, closed source NVIDIA drivers lack DRI3 support | -### Display Compositing (desktop effects) - -When using this image in tandem with a supported video card, compositing will function albeit with a performance hit when syncing the frames with pixmaps for the applications using it. This can greatly increase app compatibility if the application in question requires compositing, but requires a real GPU to be mounted into the container. By default we disable compositing at a DE level for performance reasons on our downstream images, but it can be enabled by the user and programs using compositing will still function even if the DE has it disabled in its settings. When building desktop images be sure you understand that with it enabled by default only users that have a compatible GPU mounted in will be able to use your image. - ## Nvidia GPU Support **Nvidia is not compatible with Alpine based images** diff --git a/readme-vars.yml b/readme-vars.yml index bfabd84..3f0b676 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -15,7 +15,7 @@ full_custom_readme: | | Variable | Description | | :----: | --- | | LC_ALL | Set the Language for the container to run as IE `fr_FR.UTF-8` `ar_AE.UTF-8` | - | NO_DECOR | If set the application will run without window borders for use as a PWA. (Decor can be enabled and disabled with Ctrl+Shift+d) | + | NO_DECOR | If set the application will run without window borders. (Decor can be enabled and disabled with Ctrl+Shift+d) | | NO_FULL | Do not autmatically fullscreen applications when using openbox. | ## Language Support - Internationalization @@ -57,7 +57,7 @@ full_custom_readme: | Included in these base images is a simple [Openbox DE](http://openbox.org/) and the accompanying logic needed to launch a single application. Lets look at the bare minimum needed to create an application container starting with a Dockerfile: ``` - FROM ghcr.io/linuxserver/baseimage-rdesktop:3.20 + FROM ghcr.io/linuxserver/baseimage-rdesktop:alpine320 RUN apk add --no-cache firefox COPY /root / ``` @@ -145,10 +145,6 @@ full_custom_readme: | | AMD | AMDGPU, Radeon, and ATI drivers for AMD dedicated or APU chipsets | | NVIDIA | nouveau2 drivers only, closed source NVIDIA drivers lack DRI3 support | - ### Display Compositing (desktop effects) - - When using this image in tandem with a supported video card, compositing will function albeit with a performance hit when syncing the frames with pixmaps for the applications using it. This can greatly increase app compatibility if the application in question requires compositing, but requires a real GPU to be mounted into the container. By default we disable compositing at a DE level for performance reasons on our downstream images, but it can be enabled by the user and programs using compositing will still function even if the DE has it disabled in its settings. When building desktop images be sure you understand that with it enabled by default only users that have a compatible GPU mounted in will be able to use your image. - ## Nvidia GPU Support **Nvidia is not compatible with Alpine based images** diff --git a/root/defaults/startwm.sh b/root/defaults/startwm.sh index 64cd697..46bc220 100755 --- a/root/defaults/startwm.sh +++ b/root/defaults/startwm.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +# Combine env +/usr/bin/with-contenv /usr/bin/env | sed 's/^/export /g' > /defaults/env.sh +source /defaults/env.sh +rm /defaults/env.sh + # Enable Nvidia GPU support if detected if which nvidia-smi; then export LIBGL_KOPPER_DRI2=1