dev #2
@@ -1,27 +1,110 @@
|
||||
# Example Dockerfile for arm64
|
||||
ARG BASE_IMAGE=alpine:latest
|
||||
ARG BASE_IMAGE=debian:bookworm
|
||||
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
ARG MAINTAINER
|
||||
ARG TZ
|
||||
ARG APP_NAME
|
||||
ARG APP_USER
|
||||
|
||||
LABEL maintainer="${MAINTAINER}"
|
||||
LABEL org.opencontainers.image.title="${APP_NAME}"
|
||||
|
||||
ENV TZ=${TZ}
|
||||
ENV USER=${APP_USER}
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LANG=de_DE.UTF-8
|
||||
ENV LANGUAGE=de_DE:de
|
||||
ENV LC_ALL=de_DE.UTF-8
|
||||
|
||||
RUN apk add --no-cache tzdata ca-certificates
|
||||
RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/debian.sources && \
|
||||
apt-get update && apt-get install -y \
|
||||
xrdp \
|
||||
sssd \
|
||||
sssd-tools \
|
||||
libpam-sss \
|
||||
libnss-sss \
|
||||
ldap-utils \
|
||||
ca-certificates \
|
||||
dbus-x11 \
|
||||
xfce4 \
|
||||
xfce4-terminal \
|
||||
sudo \
|
||||
firefox-esr \
|
||||
firefox-esr-l10n-de \
|
||||
thunderbird \
|
||||
thunderbird-l10n-de \
|
||||
locales \
|
||||
tzdata \
|
||||
keyboard-configuration \
|
||||
x11-xkb-utils && \
|
||||
apt-get install -y \
|
||||
pulseaudio \
|
||||
build-essential \
|
||||
dpkg-dev \
|
||||
git \
|
||||
libpulse-dev \
|
||||
meson \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
autoconf \
|
||||
libtool && \
|
||||
apt-get build-dep -y pulseaudio && \
|
||||
cd /tmp && \
|
||||
apt-get source pulseaudio && \
|
||||
PULSE_DIR=$(find /tmp -maxdepth 1 -type d -name "pulseaudio-*" | head -n 1) && \
|
||||
cd $PULSE_DIR && \
|
||||
meson setup build \
|
||||
-Dman=false \
|
||||
-Dtests=false \
|
||||
-Ddoxygen=false && \
|
||||
cd /tmp && \
|
||||
git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git && \
|
||||
cd pulseaudio-module-xrdp && \
|
||||
./bootstrap && \
|
||||
./configure PULSE_DIR=$PULSE_DIR && \
|
||||
make && \
|
||||
make install && \
|
||||
cd / && \
|
||||
rm -rf /tmp/pulseaudio-* /tmp/pulseaudio-module-xrdp && \
|
||||
apt-get remove -y build-essential dpkg-dev meson ninja-build autoconf libtool && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
sed -i 's/^# ${LANG} UTF-8/${LANG} UTF-8/' /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
update-locale LANG=${LANG} LANGUAGE=${LANGUAGE} LC_ALL=${LC_ALL} && \
|
||||
ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && \
|
||||
dpkg-reconfigure -f noninteractive tzdata && \
|
||||
cat > /etc/default/keyboard <<'EOF'
|
||||
XKBMODEL="pc105"
|
||||
XKBLAYOUT="de"
|
||||
XKBVARIANT=""
|
||||
XKBOPTIONS=""
|
||||
BACKSPACE="guess"
|
||||
EOF && \
|
||||
dpkg-reconfigure -f noninteractive keyboard-configuration
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./config /app/config
|
||||
COPY ./data /app/data
|
||||
COPY config/pam/ /etc/pam.d/
|
||||
COPY config/nsswitch.conf /etc/nsswitch.conf
|
||||
COPY config/xrdp/ /etc/xrdp/
|
||||
COPY config/ldap/ /etc/ldap/
|
||||
COPY config/skel/ /etc/skel/
|
||||
COPY config/sudoers /etc/sudoers
|
||||
|
||||
RUN adduser -D ${APP_USER} && chown -R ${APP_USER}:${APP_USER} /app
|
||||
RUN chmod 440 /etc/sudoers && \
|
||||
mkdir -p /etc/sssd && chown root:root /etc/sssd && chmod 755 /etc/sssd && \
|
||||
mkdir -p /home && chmod 755 /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 '1i export LANG=${LANG}\nexport LANGUAGE=${LANGUAGE}\nexport LC_ALL=${LC_ALL}' /etc/xrdp/startwm.sh && \
|
||||
chmod +x /etc/xrdp/startwm.sh && \
|
||||
mkdir -p /etc/xdg/xfce4 && \
|
||||
echo "setxkbmap de" >> /etc/xdg/xfce4/xinitrc
|
||||
|
||||
USER ${APP_USER}
|
||||
EXPOSE 3389
|
||||
|
||||
CMD ["sh"]
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
CMD ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user