-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (32 loc) · 1.05 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
FROM ubuntu:18.04
# Set working directory and copy shell script(s)
WORKDIR /root
COPY package_installs.sh .
# Run package installs
RUN ./package_installs.sh
# Fix terminal panel shortcut
RUN sed -i 's|Exec=exo-open --launch TerminalEmulator|Exec=/usr/bin/xfce4-terminal|g' \
/usr/share/applications/exo-terminal-emulator.desktop
# Set solid blue background (should reduce latency)
COPY background.jpg /usr/share/backgrounds/xfce/xfce-teal.jpg
# Set up new non-sudo user dev
RUN useradd dev ; \
mkdir /home/dev ; \
chown -R dev:dev /home/dev ; \
chsh -s /bin/bash dev
USER dev
ENV USER=dev
WORKDIR /home/dev
# Optional presetting of dev's VNC password
COPY fill_vnc_pass.exp .
ARG VNC_PASS=""
RUN if [ ! -z $VNC_PASS ]; then ./fill_vnc_pass.exp ${VNC_PASS}; fi
# This doesn't do much, but it's good formality and for clarity of intent
EXPOSE 5901
# Preset VNC config
RUN printf "\$geometry = \"1920x1080\";" > .vncrc ; \
mkdir -p .vnc && cd .vnc ; \
printf "startxfce4 &" > xstartup ; \
chmod +x xstartup
# Launch VNC server on container start
CMD vncserver ; /bin/bash