forked from danielguerra69/ubuntu-xrdp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·107 lines (93 loc) · 3.06 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
FROM ubuntu:18.04 as builder
MAINTAINER Daniel Guerra
# Install packages
ENV DEBIAN_FRONTEND noninteractive
RUN sed -i "s/# deb-src/deb-src/g" /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -yy upgrade
ENV BUILD_DEPS="git autoconf pkg-config libssl-dev libpam0g-dev \
libx11-dev libxfixes-dev libxrandr-dev nasm xsltproc flex \
bison libxml2-dev dpkg-dev libcap-dev libtool wget"
RUN apt-get -yy install sudo apt-utils software-properties-common $BUILD_DEPS
# Build pulseaudio
#WORKDIR /tmp
#RUN apt-get source pulseaudio
#RUN apt-get build-dep -yy pulseaudio
#WORKDIR /tmp/pulseaudio-11.1
#RUN dpkg-buildpackage -uc -b
# Build xrdp
WORKDIR /tmp
RUN git clone --branch v0.9.13.1 --recursive https://github.com/neutrinolabs/xrdp.git
WORKDIR /tmp/xrdp
RUN ./bootstrap
RUN ./configure
RUN make
# Build jdk
WORKDIR /tmp
RUN wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
RUN sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
RUN sudo apt install --yes adoptopenjdk-11-hotspot
# Finaly build the drivers
#WORKDIR /tmp/xrdp/sesman/chansrv/pulse
#RUN sed -i "s/\/tmp\/pulseaudio\-10\.0/\/tmp\/pulseaudio\-11\.1/g" Makefile
#RUN make
#RUN mkdir -p /tmp/so
#RUN cp *.so /tmp/so
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt update && apt -y full-upgrade && apt install -y \
ca-certificates \
less \
locales \
openssh-server \
sudo \
supervisor \
uuid-runtime \
vim \
wget \
xauth \
xautolock \
xorgxrdp \
xprintidle \
xrdp \
wget\
build-essential\
gfortran\
software-properties-common\
gradle\
git\
xfce4\
xterm\
&& \
rm -rf /var/cache/apt /var/lib/apt/lists
#COPY --from=builder /tmp/so/module-xrdp-source.so /var/lib/xrdp-pulseaudio-installer
#COPY --from=builder /tmp/so/module-xrdp-sink.so /var/lib/xrdp-pulseaudio-installer
ADD bin /usr/bin
ADD etc /etc
ADD autostart /etc/xdg/autostart
#ADD pulse /usr/lib/pulse-10.0/modules/
# Configure
RUN cp /etc/X11/xrdp/xorg.conf /etc/X11
RUN sed -i "s/console/anybody/g" /etc/X11/Xwrapper.config
RUN sed -i "s/xrdp\/xorg/xorg/g" /etc/xrdp/sesman.ini
RUN locale-gen en_US.UTF-8
RUN echo "xfce4-session" > /etc/skel/.Xclients
RUN rm -rf /etc/xrdp/rsakeys.ini /etc/xrdp/*.pem
# Add sample user
RUN addgroup ubuntu
RUN useradd -m -s /bin/bash -g ubuntu ubuntu
RUN echo "ubuntu:ubuntu" | /usr/sbin/chpasswd
RUN echo "ubuntu ALL=(ALL) ALL" >> /etc/sudoers
RUN cp -r /etc/ssh /ssh_orig && \
rm -rf /etc/ssh/* && \
rm -rf /etc/xrdp/rsakeys.ini /etc/xrdp/*.pem
RUN apt-get update && apt-get install wget -y
RUN wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb
RUN dpkg -i ./libcudnn7_7.4.2.24-1+cuda10.0_amd64.deb
RUN wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/libcudnn7-dev_7.4.2.24-1+cuda10.0_amd64.deb
RUN dpkg -i ./libcudnn7-dev_7.4.2.24-1+cuda10.0_amd64.deb
# Docker config
VOLUME ["/etc/ssh","/home"]
EXPOSE 3389 22 9001
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
CMD ["supervisord"]