-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
52 lines (40 loc) · 1.49 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
# Dockerfile for containerizing a graphical X11 applications.
#
# X11 applications are exposed via VNC on port 5900
#
# The VNC port is unprotected. To protect it, one can
# use a separete ssh jump host, e.g.
# https://registry.hub.docker.com/u/geggo98/ssh-vpn-jump-host/
#
# Author: [email protected]
# Date: 2014-11-06
# Using Ubuntu LTS, because it gets security updates very fast
FROM ubuntu:latest
MAINTAINER Stefan Schwetschke "[email protected]"
ENV REFRESHED_APT_AT 2016-02-20
# Set locale to UTF-8 to fix the locale warnings
RUN localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || :
# Set DEBIAN_FRONTEND to noninteractive, so dpkg will not wait for user inputs
ENV DEBIAN_FRONTEND noninteractive
# Installing the environment required: xserver, xdm, flux box, roc-filer and ssh
# and install some basic packages
# and clean up apt-get
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y lxde-core lxterminal xvfb x11vnc sudo && \
apt-get install -y firefox xterm && \
apt-get clean
# Fix problems with Upstart and DBus inside a docker container.
RUN dpkg-divert --local --rename --add /sbin/initctl && ln -sf /bin/true /sbin/initctl
# Copy the files into the container
ADD . /x11-src
RUN chmod -R a=rX /x11-src
# Local user, may be overwritten by dependent build
ENV X11_USER xclient
# Resolution and color depth of simulated display
ENV RESOLUTION 1280x1024x16
VOLUME /home
EXPOSE 5900
# Start x11vnc
ENTRYPOINT ["/bin/bash", "/x11-src/startup.sh"]
CMD ["/usr/bin/lxterminal"]