Skip to content

Commit

Permalink
feat: upgrade base image and tigervnc; install numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
oott123 committed Mar 19, 2020
1 parent 6604ff3 commit 6489974
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# 9001 - websocketify
# 5901 - tigervnc

# based on ubuntu 16.04 LTS
FROM ubuntu:xenial
# based on ubuntu 18.04 LTS
FROM ubuntu:18.04

# 各种环境变量
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
Expand All @@ -22,14 +23,16 @@ RUN groupadd user && useradd -m -g user user && \
apt-get install -y \
git \
ca-certificates wget locales \
nginx \
xorg openbox && \
nginx sudo \
xorg openbox python-numpy rxvt-unicode && \
wget -O - https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-amd64.tar.gz | tar -xzv && \
# workaround for https://github.com/just-containers/s6-overlay/issues/158
ln -s /init /init.entrypoint && \
# tigervnc
wget -O /tmp/tigervnc.deb https://bintray.com/artifact/download/tigervnc/stable/ubuntu-16.04LTS/amd64/tigervncserver_1.9.0-1ubuntu1_amd64.deb && \
(dpkg -i /tmp/tigervnc.deb || apt-get -f -y install) && \
wget -O /tmp/tigervnc.tar.gz https://bintray.com/tigervnc/stable/download_file?file_path=tigervnc-1.10.1.x86_64.tar.gz && \
tar xzf /tmp/tigervnc.tar.gz -C /tmp && \
chown root:root -R /tmp/tigervnc-1.10.1.x86_64 && \
tar c -C /tmp/tigervnc-1.10.1.x86_64 usr | tar x -C / && \
locale-gen en_US.UTF-8 && \
# novnc
mkdir -p /app/src && \
Expand All @@ -38,7 +41,7 @@ RUN groupadd user && useradd -m -g user user && \
apt-get purge -y git wget && \
apt-get autoremove -y && \
apt-get clean && \
rm -fr /tmp/* /app/src/novnc/.git /app/src/websockify/.git
rm -fr /tmp/* /app/src/novnc/.git /app/src/websockify/.git /var/lib/apt/lists

# copy files
COPY ./docker-root /
Expand Down
10 changes: 10 additions & 0 deletions docker-root/etc/X11/Xvnc-session
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

test x"$SHELL" = x"" && SHELL=/bin/bash
test x"$1" = x"" && set -- default

vncconfig -nowin &
$SHELL -l <<EOF
exec /etc/X11/Xsession "$@"
EOF
vncserver -kill $DISPLAY
2 changes: 1 addition & 1 deletion docker-root/etc/services.d/tigervnc/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/with-contenv bash
sudo -Hu user /usr/bin/vncserver :11 -fg -geometry $VNC_GEOMETRY -depth 24
sudo -Hu user /usr/bin/vncserver :11 -fg -geometry $VNC_GEOMETRY -depth 24

0 comments on commit 6489974

Please sign in to comment.