2021-02-05 11:49:47 +01:00
|
|
|
FROM centos:centos7
|
|
|
|
|
2021-02-11 08:45:01 +01:00
|
|
|
RUN yum install -y epel-release && yum install -y openbox xterm
|
|
|
|
RUN yum erase -y pm-utils xscreensaver*
|
|
|
|
RUN yum install -y vim less
|
2021-02-05 11:49:47 +01:00
|
|
|
|
|
|
|
ARG KASMVNC_PACKAGE_DIR
|
|
|
|
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp
|
|
|
|
RUN yum localinstall -y /tmp/*.rpm
|
|
|
|
|
2021-02-11 08:45:01 +01:00
|
|
|
RUN useradd -m foo
|
2021-02-05 11:49:47 +01:00
|
|
|
|
2021-02-11 08:45:01 +01:00
|
|
|
USER foo
|
2021-02-05 11:49:47 +01:00
|
|
|
|
2021-02-11 08:45:01 +01:00
|
|
|
RUN mkdir -p ~/.config/openbox && echo xterm > ~/.config/openbox/autostart && chmod +x ~/.config/openbox/autostart
|
|
|
|
RUN mkdir ~/.vnc && echo '/usr/bin/openbox-session &' >> ~/.vnc/xstartup && \
|
2021-02-05 11:49:47 +01:00
|
|
|
chmod +x ~/.vnc/xstartup
|
2021-02-11 08:45:01 +01:00
|
|
|
RUN openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout $HOME/.vnc/self.pem -out $HOME/.vnc/self.pem -subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=kasm/emailAddress=none@none.none"
|
|
|
|
RUN echo bar | kasmvncpasswd -f > $HOME/.kasmpasswd && chmod 0600 $HOME/.kasmpasswd
|
2021-02-05 11:49:47 +01:00
|
|
|
|
2021-02-11 08:45:01 +01:00
|
|
|
ENTRYPOINT bash -c "vncserver :1 -interface 0.0.0.0 && vncserver -kill :1 && vncserver :1 -depth 24 -geometry 1280x1050 -websocketPort 8443 -cert $HOME/.vnc/self.pem -sslOnly -FrameRate=24 -interface 0.0.0.0 -httpd /usr/share/kasmvnc/www && tail -f $HOME/.vnc/*.log "
|