mirror of
https://github.com/linuxserver/docker-baseimage-rdesktop.git
synced 2026-02-20 08:39:58 +08:00
159 lines
4.8 KiB
Docker
159 lines
4.8 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble AS buildstage
|
|
|
|
ARG XRDP_PULSE_VERSION=v0.7
|
|
ARG DEBIAN_FRONTEND="noninteractive"
|
|
|
|
RUN \
|
|
echo "**** install build deps ****" && \
|
|
sed -i 's/# deb-src/deb-src/g' /etc/apt/sources.list && \
|
|
apt-get update && \
|
|
apt-get install -y \
|
|
build-essential \
|
|
devscripts \
|
|
dpkg-dev \
|
|
git \
|
|
libpulse-dev \
|
|
meson \
|
|
pulseaudio && \
|
|
apt build-dep -y \
|
|
pulseaudio \
|
|
xrdp
|
|
|
|
RUN \
|
|
echo "**** build pulseaudio modules ****" && \
|
|
mkdir -p /buildout/var/lib/xrdp-pulseaudio-installer && \
|
|
tmp=$(mktemp -d); cd "$tmp" && \
|
|
pulseaudio_upstream_version=$(dpkg-query -W -f='${source:Upstream-Version}' pulseaudio) && \
|
|
apt-get source pulseaudio && \
|
|
cd "pulseaudio-$pulseaudio_upstream_version" && \
|
|
meson build && \
|
|
cd - && \
|
|
git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git && \
|
|
cd pulseaudio-module-xrdp && \
|
|
git checkout ${XRDP_PULSE_VERSION} && \
|
|
./bootstrap && \
|
|
./configure PULSE_DIR="$tmp/pulseaudio-$pulseaudio_upstream_version" && \
|
|
make && \
|
|
install -t "/buildout/var/lib/xrdp-pulseaudio-installer" -D -m 644 src/.libs/*.so
|
|
|
|
RUN \
|
|
echo "**** build xrdp with fuse disabled ****" && \
|
|
cd /tmp && \
|
|
apt-get source xrdp && \
|
|
cd xrdp-* && \
|
|
sed -i 's/--enable-fuse/--disable-fuse/g' debian/rules && \
|
|
debuild -b -uc -us && \
|
|
cp -ax ../xrdp_*.deb /buildout/xrdp.deb
|
|
|
|
# runtime stage
|
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
|
|
|
|
# set version label
|
|
ARG BUILD_DATE
|
|
ARG VERSION
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|
LABEL maintainer="thelamer"
|
|
|
|
# copy over libs and installers from build stage
|
|
COPY --from=buildstage /buildout/ /
|
|
|
|
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
|
|
ENV NVIDIA_DRIVER_CAPABILITIES=all \
|
|
HOME=/config
|
|
|
|
RUN \
|
|
echo "**** enable locales ****" && \
|
|
sed -i \
|
|
'/locale/d' \
|
|
/etc/dpkg/dpkg.cfg.d/excludes && \
|
|
echo "**** add docker repos ****" && \
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | tee /usr/share/keyrings/docker.asc >/dev/null && \
|
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker.asc] https://download.docker.com/linux/ubuntu noble stable" > /etc/apt/sources.list.d/docker.list && \
|
|
echo "**** install deps ****" && \
|
|
ldconfig && \
|
|
apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive \
|
|
apt-get install -y --no-install-recommends \
|
|
apt-transport-https \
|
|
ca-certificates \
|
|
dbus-x11 \
|
|
docker-ce-cli \
|
|
docker-compose-plugin \
|
|
fonts-noto-color-emoji \
|
|
fonts-noto-core \
|
|
gawk \
|
|
gnupg2 \
|
|
libfuse2 \
|
|
libx11-dev \
|
|
libxfixes3 \
|
|
libxml2 \
|
|
libxrandr2 \
|
|
locales-all \
|
|
mesa-va-drivers \
|
|
mesa-vulkan-drivers \
|
|
netcat-openbsd \
|
|
openbox \
|
|
openssh-client \
|
|
pulseaudio \
|
|
software-properties-common \
|
|
sudo \
|
|
x11-apps \
|
|
x11-xserver-utils \
|
|
xfonts-base \
|
|
xorgxrdp \
|
|
xrdp \
|
|
xserver-common \
|
|
xserver-xorg-core \
|
|
xserver-xorg-video-amdgpu \
|
|
xserver-xorg-video-ati \
|
|
xserver-xorg-video-intel \
|
|
xserver-xorg-video-nouveau \
|
|
xserver-xorg-video-qxl \
|
|
xterm \
|
|
xutils \
|
|
zlib1g && \
|
|
dpkg -i /xrdp.deb && \
|
|
rm /xrdp.deb && \
|
|
echo "**** openbox tweaks ****" && \
|
|
sed -i \
|
|
-e 's/NLIMC/NLMC/g' \
|
|
-e '/debian-menu/d' \
|
|
-e 's|</applications>| <application class="*"><maximized>yes</maximized></application>\n</applications>|' \
|
|
-e 's|</keyboard>| <keybind key="C-S-d"><action name="ToggleDecorations"/></keybind>\n</keyboard>|' \
|
|
/etc/xdg/openbox/rc.xml && \
|
|
echo "**** user perms ****" && \
|
|
sed -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' \
|
|
-i /etc/sudoers && \
|
|
echo "abc:abc" | chpasswd && \
|
|
usermod -s /bin/bash abc && \
|
|
usermod -aG sudo abc && \
|
|
echo "**** proot-apps ****" && \
|
|
mkdir /proot-apps/ && \
|
|
PAPPS_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/proot-apps/releases/latest" \
|
|
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
|
|
curl -L https://github.com/linuxserver/proot-apps/releases/download/${PAPPS_RELEASE}/proot-apps-x86_64.tar.gz \
|
|
| tar -xzf - -C /proot-apps/ && \
|
|
echo "${PAPPS_RELEASE}" > /proot-apps/pversion && \
|
|
echo "**** locales ****" && \
|
|
for LOCALE in $(curl -sL https://raw.githubusercontent.com/thelamer/lang-stash/master/langs); do \
|
|
localedef -i $LOCALE -f UTF-8 $LOCALE.UTF-8; \
|
|
done && \
|
|
echo "**** theme ****" && \
|
|
curl -s https://raw.githubusercontent.com/thelamer/lang-stash/master/theme.tar.gz \
|
|
| tar xzvf - -C /usr/share/themes/Clearlooks/openbox-3/ && \
|
|
echo "**** cleanup ****" && \
|
|
apt-get autoclean && \
|
|
rm -rf \
|
|
/var/lib/apt/lists/* \
|
|
/var/tmp/* \
|
|
/tmp/*
|
|
|
|
# add local files
|
|
COPY /root /
|
|
|
|
# ports and volumes
|
|
EXPOSE 3389
|
|
VOLUME /config
|