Skip to content

Commit

Permalink
add noVnc
Browse files Browse the repository at this point in the history
  • Loading branch information
john-shine committed Oct 24, 2019
1 parent 13b6ccf commit fa176cd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV GID=0
ENV HOME=/home/${USER}
ENV INSTALLDIR=/opt/cxoffice
ARG vnc_password=""
EXPOSE 5901
EXPOSE 5901 6080

ADD xstartup ${HOME}/.vnc/

Expand All @@ -36,9 +36,13 @@ RUN yum check-update -y ; \
export CFLAGS="-m32" && \
export LDFLAGS="-m32" && \
make && make install && \
wget https://github.com/novnc/noVNC/archive/v1.1.0.tar.gz -O /tmp/noVNC.tar.gz && \
tar -zxvf /tmp/noVNC.tar.gz -C /opt && \
git clone https://github.com/novnc/websockify /opt/noVNC-1.1.0/utils/websockify && \
mv /opt/noVNC-1.1.0/vnc_lite.html /opt/noVNC-1.1.0/index.html && \
yum remove -y git glibc-devel.i686 && \
yum groupremove -y "Development Tools" && \
rm -rf /tmp/libfaketime && \
rm -rf /tmp/libfaketime && rm -f /tmp/noVNC.tar.gz && \
yum clean all && rm -rf /var/cache/yum/*

RUN /bin/echo "@`date \"+%F %T\"`" > /etc/faketimerc
Expand All @@ -64,6 +68,7 @@ RUN /bin/echo -e 'alias ll="ls -last"' >> ${HOME}/.bashrc
# Always run the WM last!
RUN /bin/echo -e "export DISPLAY=${DISPLAY}" >> ${HOME}/.vnc/xstartup
RUN /bin/echo -e "[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources\nxsetroot -solid grey" >> ${HOME}/.vnc/xstartup
RUN /bin/echo -e "/opt/noVNC-1.1.0/utils/launch.sh --listen 6080 --vnc 127.0.0.1:5901 &" >> ${HOME}/.vnc/xstartup
RUN cp ${HOME}/.vnc/xstartup ${HOME}/.vnc/xstartup_after
RUN /bin/echo -e "${INSTALLDIR}/bin/crossover" >> ${HOME}/.vnc/xstartup_after

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4
1.5
6 changes: 5 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ fi
rm -f /tmp/.X*-lock /tmp/.X11-unix/X*
sleep 3

/usr/bin/vncserver -geometry 1920x1080 -fg
if [ -z $vnv_password ]; then
/usr/bin/vncserver -geometry 1920x1080 -fg -SecurityTypes None,TLSNone
else
/usr/bin/vncserver -geometry 1920x1080 -fg
fi
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

version=$(cat $(pwd "$0")/VERSION)
sudo docker run -d -p 5901:5901 johnshine/crossover-vnc:${version}
sudo docker run -d -p 5901:5901 -p 6080:6080 johnshine/crossover-vnc:${version}

0 comments on commit fa176cd

Please sign in to comment.