-
Notifications
You must be signed in to change notification settings - Fork 130
/
Dockerfile
59 lines (51 loc) · 1.91 KB
/
Dockerfile
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
# Build xrdp pulseaudio modules in builder container
# See https://github.com/neutrinolabs/pulseaudio-module-xrdp/wiki/README
ARG TAG=latest
FROM ubuntu:$TAG as builder
RUN sed -i -E 's/^# deb-src /deb-src /g' /etc/apt/sources.list \
&& apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
build-essential \
dpkg-dev \
git \
libpulse-dev \
pulseaudio \
&& apt-get build-dep -y pulseaudio \
&& apt-get source pulseaudio \
&& rm -rf /var/lib/apt/lists/*
RUN cd /pulseaudio-$(pulseaudio --version | awk '{print $2}') \
&& ./configure
RUN git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git /pulseaudio-module-xrdp \
&& cd /pulseaudio-module-xrdp \
&& ./bootstrap \
&& ./configure PULSE_DIR=/pulseaudio-$(pulseaudio --version | awk '{print $2}') \
&& make \
&& make install
# Build the final image
FROM ubuntu:$TAG
RUN apt-get update \
&& 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 \
&& rm -rf /var/lib/apt/lists/*
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
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 entrypoint.sh /usr/bin/entrypoint
EXPOSE 3389/tcp
ENTRYPOINT ["/usr/bin/entrypoint"]