-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.rdp
81 lines (66 loc) · 2.38 KB
/
Dockerfile.rdp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Build xrdp pulseaudio modules in builder container
# See https://github.com/neutrinolabs/pulseaudio-module-xrdp/wiki/README
ARG TAG=22.04
FROM ubuntu:$TAG as builder
RUN apt-get -y update \
&& DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
build-essential \
dpkg-dev \
git \
libpulse-dev \
pulseaudio \
ca-certificates \
lsb-release \
autoconf \
libtool \
sudo
RUN git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git /root/pulseaudio-module-xrdp \
&& cd /root/pulseaudio-module-xrdp \
&& ./scripts/install_pulseaudio_sources_apt.sh
RUN cd /root/pulseaudio-module-xrdp \
&& ./bootstrap \
&& ./configure PULSE_DIR=/root/pulseaudio.src \
&& make \
&& make install
# Build the final image
FROM ubuntu:$TAG
ARG USER_NAME=kicad
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ARG BA_TZ=Europe/Prague
RUN --mount=type=cache,target=/var/cache/apt \
apt-get -y update \
&& DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
dbus-x11 \
firefox \
git \
locales \
pavucontrol \
pulseaudio \
pulseaudio-utils \
sudo \
x11-xserver-utils \
xfce4 \
xfce4-goodies \
xfce4-pulseaudio-plugin \
xorgxrdp \
xrdp \
xubuntu-icon-theme
RUN sed -i -E 's/^; autospawn =.*/autospawn = yes/' /etc/pulse/client.conf \
&& [ -f /etc/pulse/client.conf.d/00-disable-autospawn.conf ] && sed -i -E 's/^(autospawn=.*)/# \1/' /etc/pulse/client.conf.d/00-disable-autospawn.conf || : \
&& locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
RUN groupadd --gid $USER_GID $USER_NAME \
&& useradd --uid $USER_UID --gid $USER_GID --password $(openssl passwd ${USER_NAME}) -m $USER_NAME \
&& usermod -aG sudo $USER_NAME \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
COPY --from=builder /usr/lib/pulse-*/modules/module-xrdp-sink.so /usr/lib/pulse-*/modules/module-xrdp-source.so /var/lib/xrdp-pulseaudio-installer/
COPY ./build/ubuntu-run.sh /usr/bin/entrypoint.sh
RUN chmod +x /usr/bin/entrypoint.sh
EXPOSE 3389/tcp
EXPOSE 6900/tcp
ENTRYPOINT ["/usr/bin/entrypoint.sh"]