Newer
Older
FROM base
MAINTAINER Stefano Alberto Russo <stefano.russo@inaf.it>
# Switch to root
USER root
#------------------------
# Supervisord
#------------------------
# In this container we need to use supervisord as we have two services (VNC and noVNC)
RUN apt-get install supervisor -y
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
# Supervisord conf
COPY files/supervisord.conf /etc/supervisor/
# VNC supervisord conf
COPY files/supervisord_vnc.conf /etc/supervisor/conf.d/
COPY files/run_vnc.sh /etc/supervisor/conf.d/
RUN chmod 755 /etc/supervisor/conf.d/run_vnc.sh
# noVNC supervisord conf
COPY files/supervisord_novnc.conf /etc/supervisor/conf.d/
COPY files/run_novnc.sh /etc/supervisor/conf.d/
RUN chmod 755 /etc/supervisor/conf.d/run_novnc.sh
#------------------------
# VNC
#------------------------
# Install xvfb that triggers minimal install of X base packages and xterm as sample application
RUN apt-get install xvfb xterm net-tools -y
# Install base packages for VNC server and headless desktop (2)
COPY files/tigervnc-1.8.0.x86_64.tar.gz /opt/tigervnc-1.8.0.x86_64.tar.gz
RUN cd /opt && tar -zxvf tigervnc-1.8.0.x86_64.tar.gz && mv tigervnc-1.8.0.x86_64 tigervnc
# Web VNC (noVNC) v0.6.1.
# NOTE: this is a custom version from Doro Wu (fcwu.tw@gmail.com).
# TODO: Check differences and maybe move to 0.6.2
COPY files/noVNC.tar.gz /usr/lib/
RUN cd /usr/lib/ && tar -zxvf noVNC.tar.gz
COPY files/index.html /usr/lib/noVNC
# X environment setup/startup
COPY files/xstartup /opt/tigervnc/
RUN chmod 755 /opt/tigervnc/xstartup
#------------------------
# Post-intall
#------------------------
# Fix home permissions
RUN chmod 777 /home
# Set entrypoint command
# Set user
USER metauser
# Set container name