Update Dockerfile
Browse files- Dockerfile +9 -8
Dockerfile
CHANGED
|
@@ -19,6 +19,7 @@
|
|
| 19 |
# Use the official Ubuntu image.
|
| 20 |
# Use the official Ubuntu image.
|
| 21 |
# Use the official Ubuntu image.
|
|
|
|
| 22 |
FROM ubuntu:20.04
|
| 23 |
|
| 24 |
# Set the timezone
|
|
@@ -32,10 +33,6 @@ RUN echo "keyboard-configuration keyboard-configuration/variant select English (
|
|
| 32 |
# Pre-seed the display manager
|
| 33 |
RUN echo "gdm3 shared/default-x-display-manager select gdm3" | debconf-set-selections
|
| 34 |
|
| 35 |
-
# Pre-seed the desktop environment
|
| 36 |
-
RUN echo "xfce4 xfce4/desktop_icons_show_home boolean false" | debconf-set-selections
|
| 37 |
-
RUN echo "xfce4 xfce4/desktop_icons_show_trash boolean false" | debconf-set-selections
|
| 38 |
-
|
| 39 |
# Install dependencies in non-interactive mode
|
| 40 |
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
|
| 41 |
xfce4 \
|
|
@@ -46,8 +43,12 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
|
|
| 46 |
tzdata \
|
| 47 |
keyboard-configuration \
|
| 48 |
gdm3 \
|
|
|
|
| 49 |
&& rm -rf /var/lib/apt/lists/*
|
| 50 |
|
|
|
|
|
|
|
|
|
|
| 51 |
# Set up VNC
|
| 52 |
ENV USER=root
|
| 53 |
ENV DISPLAY=:1
|
|
@@ -58,8 +59,8 @@ RUN mkdir -p /root/.vnc && \
|
|
| 58 |
echo $VNC_PASSWORD | vncpasswd -f > /root/.vnc/passwd && \
|
| 59 |
chmod 600 /root/.vnc/passwd
|
| 60 |
|
| 61 |
-
# Expose VNC
|
| 62 |
-
EXPOSE 5901
|
| 63 |
|
| 64 |
-
# Start VNC server
|
| 65 |
-
CMD ["sh", "-c", "vncserver $DISPLAY -geometry 1280x800 -depth 24 &&
|
|
|
|
| 19 |
# Use the official Ubuntu image.
|
| 20 |
# Use the official Ubuntu image.
|
| 21 |
# Use the official Ubuntu image.
|
| 22 |
+
# Use the official Ubuntu image.
|
| 23 |
FROM ubuntu:20.04
|
| 24 |
|
| 25 |
# Set the timezone
|
|
|
|
| 33 |
# Pre-seed the display manager
|
| 34 |
RUN echo "gdm3 shared/default-x-display-manager select gdm3" | debconf-set-selections
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
# Install dependencies in non-interactive mode
|
| 37 |
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
|
| 38 |
xfce4 \
|
|
|
|
| 43 |
tzdata \
|
| 44 |
keyboard-configuration \
|
| 45 |
gdm3 \
|
| 46 |
+
python3-pip \
|
| 47 |
&& rm -rf /var/lib/apt/lists/*
|
| 48 |
|
| 49 |
+
# Install noVNC and websockify
|
| 50 |
+
RUN pip3 install noVNC websockify
|
| 51 |
+
|
| 52 |
# Set up VNC
|
| 53 |
ENV USER=root
|
| 54 |
ENV DISPLAY=:1
|
|
|
|
| 59 |
echo $VNC_PASSWORD | vncpasswd -f > /root/.vnc/passwd && \
|
| 60 |
chmod 600 /root/.vnc/passwd
|
| 61 |
|
| 62 |
+
# Expose VNC and noVNC ports
|
| 63 |
+
EXPOSE 5901 6080
|
| 64 |
|
| 65 |
+
# Start VNC server and noVNC
|
| 66 |
+
CMD ["sh", "-c", "vncserver $DISPLAY -geometry 1280x800 -depth 24 && websockify --web=/usr/local/lib/python3.8/dist-packages/novnc/ 6080 localhost:5901"]
|