-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
100 lines (85 loc) · 2.94 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
# -*- dockerfile -*-
FROM ubuntu:20.04
LABEL version="16.1.10d"
LABEL org.opencontainers.image.authors="[email protected]"
LABEL description="GiD and NoVNC (an HTML VNC client) on port 8083 on ubuntu"
# Set correct environment variables
ENV HOME=/root
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
# ENV LANG en_US.UTF-8
# ENV LANGUAGE en_US.UTF-8
# to use en_US.UTF-8 folowwing is needed:
# RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
# && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG=C.UTF-8
ENV LANGUAGE=C.UTF-8
ENV TZ=Europe/Madrid
ENV SCREEN_RESOLUTION=1280x800
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Installing apps
# (Note: git is here just in case noVNC needs it in launch.sh (noVNC-1.1.0) / novnc_proxy (noVNC-1.5.0)
RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y
RUN apt-get -y install \
binutils \
curl \
davfs2 \
dos2unix \
fluxbox \
fuse \
git \
git-core \
libglu1-mesa \
libharfbuzz0b \
liblzma5 \
libnss3 \
lzma \
supervisor \
x11vnc \
xvfb \
x11-utils \
x11-xserver-utils \
xz-utils \
zip
# fuse is needed by davfs / wdfs to mount gid cloud folder
# davfs2 added mount option, performs better than wdfs, but in kernel space.
# wget
# curl
# net-tools
# x11-xserver-utils
# x11-server-utils to install xrandr
# x11-utils to install xdpyinfo
# House cleaning
RUN apt-get autoclean
# Docker's supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY install_gid.sh /root/install_gid.sh
COPY create-basic-preferences.sh /root/create-basic-preferences.sh
RUN dos2unix /etc/supervisor/conf.d/supervisord.conf
RUN dos2unix /root/install_gid.sh
RUN dos2unix /root/create-basic-preferences.sh
# supervisord.conf launches "/gid/gid -t ::gid_rest::server::start"
# dst_path = /gid
WORKDIR /root/
RUN chmod 755 ./install_gid.sh && \
./install_gid.sh /gid
RUN chmod 755 ./create-basic-preferences.sh && \
./create-basic-preferences.sh /gid
# Set display
ENV DISPLAY=:0
# Change work directory to add novnc files
WORKDIR /root/
# ADD noVNC-0.6.2 /root/novnc/
# RUN ln -s /root/novnc/vnc_auto.html /root/novnc/index.html
ADD noVNC-1.5.0 /root/novnc/
# line ending conversions, if build host is windows....
RUN zip -r novnc.zip novnc && \
unzip -ao novnc.zip && \
rm novnc.zip
RUN ln -s /root/novnc/vnc_lite.html /root/novnc/index.html
# Expose Port (Note: if you change it do it as well in surpervisord.conf)
# **port 8083** is the http://xxx:8083 vnc-like visualization of GiD application in a graphical environment
# **port 15818** is the http:// image-server of GiD
# **port 6900** is GiD's own communication protocol to enable gid-client <----> gid-server communication
EXPOSE 8083 15818 6900
CMD ["/usr/bin/supervisord"]