combine env on init for xrdp display vars

This commit is contained in:
thelamer 2024-08-06 13:11:10 -04:00
parent 9051407d8d
commit d75859ecb9
5 changed files with 19 additions and 20 deletions

View File

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

View File

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

View File

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

View File

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

View File

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