Files
base-image-debian-rdp-ldap/Dockerfile.aarch64
T
2026-10-09 13:27:42 +00:00

73 lines
2.8 KiB
Docker

ARG BUILD_BASE_IMAGE
FROM ${BUILD_BASE_IMAGE}
ARG BUILD_MAINTAINER
ARG BUILD_TZ
ARG BUILD_APP_NAME
ARG BUILD_LANG
ARG BUILD_LANGUAGE
ARG BUILD_LC_ALL
ARG BUILD_COUNTRY
LABEL maintainer="${BUILD_MAINTAINER}"
LABEL org.opencontainers.image.title="${BUILD_APP_NAME}"
ENV TZ=${BUILD_TZ}
ENV LANG=${BUILD_LANG}
ENV LANGUAGE=${BUILD_LANGUAGE}
ENV LC_ALL=${BUILD_LC_ALL}
ENV COUNTRY=${BUILD_COUNTRY}
ENV DEBIAN_FRONTEND=noninteractive
COPY packages.txt /tmp/packages.txt
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/debian.sources && \
apt-get update && apt-get install -y --no-install-recommends \
$(cat /tmp/packages.txt) \
firefox-esr-l10n-${BUILD_COUNTRY} \
thunderbird-l10n-${BUILD_COUNTRY} && \
cd /tmp && \
git clone https://github.com/neutrinolabs/pipewire-module-xrdp.git && \
cd pipewire-module-xrdp && \
./bootstrap && \
./configure && \
make && \
make install && \
cd / && \
rm -rf /tmp/pipewire-module-xrdp && \
apt-get remove -y build-essential dpkg-dev git autoconf automake libtool pkg-config libpipewire-0.3-dev libspa-0.2-dev && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
echo "${LANG} UTF-8" > /etc/locale.gen && \
locale-gen ${LANG} && \
update-locale LANG=${LANG} LANGUAGE=${LANGUAGE} && \
ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata && \
printf 'XKBMODEL="pc105"\nXKBLAYOUT="%s"\nXKBVARIANT=""\nXKBOPTIONS=""\nBACKSPACE="guess"\n' "${COUNTRY}" > /etc/default/keyboard && \
dpkg-reconfigure -f noninteractive keyboard-configuration && \
rm -rf /var/lib/apt/lists/* /tmp/packages.txt
# Systemweite statische Konfigurationen für LDAP/PAM/Sudo
RUN sed -i '/%users/s/^/# /' /etc/sudoers && \
echo "sudoers: files sss" >> /etc/nsswitch.conf && \
echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" >> /etc/pam.d/common-session
RUN chmod 440 /etc/sudoers && \
mkdir -p /etc/sssd && chown root:root /etc/sssd && chmod 755 /etc/sssd && \
mkdir -p /home && chmod 777 /home && \
chown xrdp:xrdp /etc/xrdp/key.pem /etc/xrdp/cert.pem /etc/xrdp/rsakeys.ini && \
chmod 600 /etc/xrdp/key.pem /etc/xrdp/rsakeys.ini && \
chmod 644 /etc/xrdp/cert.pem && \
echo "LANG=${LANG}" >> /etc/environment && \
echo "LANGUAGE=${LANGUAGE}" >> /etc/environment && \
echo "LC_ALL=${LC_ALL}" >> /etc/environment && \
sed -i '2i export LANG=${LANG}\nexport LANGUAGE=${LANGUAGE}\nexport LC_ALL=${LC_ALL}\nexport XDG_SESSION_TYPE=x11\nexport GDK_BACKEND=x11' /etc/xrdp/startwm.sh && \
echo "exec gnome-session" >> /etc/xrdp/startwm.sh && \
chmod +x /etc/xrdp/startwm.sh
EXPOSE 3389
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]