Skip to content

Commit

Permalink
refactor: upgrade novnc; use vnc.html instead of lite
Browse files Browse the repository at this point in the history
  • Loading branch information
oott123 committed Aug 27, 2017
1 parent a40cc09 commit ed1a48c
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 19 deletions.
30 changes: 12 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,32 @@ ENV LANG=en_US.UTF-8 \
# 首先加用户,防止 uid/gid 不稳定
RUN groupadd -r user && useradd -r -m -g user user

# 使用 s6 init
ADD https://github.com/just-containers/s6-overlay/releases/download/v1.18.1.5/s6-overlay-amd64.tar.gz /tmp/
RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / && \
# workaround for https://github.com/just-containers/s6-overlay/issues/158
ln -s /init /init.entrypoint
ADD fix-attrs.d /etc/fix-attrs.d
ADD cont-init.d /etc/cont-init.d
ADD services.d /etc/services.d
# download files out of container
ADD https://github.com/just-containers/s6-overlay/releases/download/v1.18.1.5/s6-overlay-amd64.tar.gz /tmp/s6-overlay-amd64.tar.gz
ADD https://bintray.com/artifact/download/tigervnc/stable/ubuntu-16.04LTS/amd64/tigervncserver_1.7.1-1ubuntu1_amd64.deb /tmp/tigervnc.deb

# 安装依赖和代码
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y \
python \
git \
ca-certificates wget curl \
sudo nginx\
python git \
ca-certificates wget curl locales \
sudo nginx \
xorg openbox && \
wget https://bintray.com/artifact/download/tigervnc/stable/ubuntu-16.04LTS/amd64/tigervncserver_1.7.1-1ubuntu1_amd64.deb -O /tmp/tigervnc.deb && \
tar -xvf /tmp/s6-overlay-amd64.tar.gz && \
# workaround for https://github.com/just-containers/s6-overlay/issues/158
ln -s /init /init.entrypoint && \
# tigervnc
(dpkg -i /tmp/tigervnc.deb || apt-get -f -y install) && \
rm -f /tmp/tigervnc.deb && \
locale-gen en_US.UTF-8 && \
# novnc
mkdir -p /app/src && \
git clone --depth=1 https://github.com/novnc/noVNC.git /app/src/novnc && \
git clone --depth=1 https://github.com/novnc/websockify.git /app/src/websockify && \
cd /app/src/websockify && \
apt-get autoremove -y && \
apt-get clean

# copy files
COPY /etc/nginx.conf /etc/nginx/nginx.conf
COPY vncmain.sh /app/vncmain.sh
COPY entrypoint.sh /sbin/entrypoint.sh
COPY ./docker-root /

EXPOSE 9000

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion etc/nginx.conf → docker-root/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ http {
server_name _;

location / {
index vnc_auto.html index.html index.htm;
index vnc.html index.html index.htm;
}

location /websockify {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ed1a48c

Please sign in to comment.