forked from oott123/docker-novnc
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.arm64
57 lines (51 loc) · 1.88 KB
/
Dockerfile.arm64
1
2
3
4
5
6
7
8
9
10
11
12
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
# 端口规划
# 9000 - nginx
# 9001 - websocketify
# 5911 - tigervnc
# based on ubuntu 18.04 LTS
FROM ubuntu:18.04
# 各种环境变量
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
S6_CMD_ARG0=/sbin/entrypoint.sh \
VNC_GEOMETRY=800x600 \
VNC_PASSWD='MAX8char' \
USER_PASSWD='' \
HTTP_AUTH_USER='' \
HTTP_AUTH_PASSWD='' \
DEBIAN_FRONTEND=noninteractive
# 首先加用户,防止 uid/gid 不稳定
RUN groupadd user && useradd -m -g user user && \
# 安装依赖和代码
apt-get update && apt-get upgrade -y && \
apt-get install -y \
git zip unzip \
ca-certificates wget locales \
nginx sudo apache2-utils \
xorg openbox python stalonetray \
python3 python3-pip rxvt-unicode && \
# s6-overlay@v1.22.1.0
wget -O - https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-aarch64.tar.gz | tar -xzv && \
# workaround for https://github.com/just-containers/s6-overlay/issues/158
ln -s /init /init.entrypoint && \
# tigervnc@v1.13.1
wget -O /tmp/tigervncserver.deb https://sourceforge.net/projects/tigervnc/files/stable/1.13.1/ubuntu-18.04LTS/arm64/tigervncserver_1.13.1-1ubuntu1_arm64.deb/download && \
apt-get install -f -y /tmp/tigervncserver.deb && \
locale-gen en_US.UTF-8 && \
mkdir -p /app/src && \
# novnc@v1.4.0
git clone --depth=1 --branch v1.4.0 https://github.com/novnc/noVNC.git /app/src/novnc && \
# novnc@v0.11.0
git clone --depth=1 --branch v0.11.0 https://github.com/novnc/websockify.git /app/src/websockify && \
apt-get autoremove -y && \
apt-get clean && \
rm -fr /tmp/* /app/src/novnc/.git /app/src/websockify/.git /var/lib/apt/lists
# copy files
COPY ./docker-root /tmp/tmp-docker-root
RUN chmod -R 755 /tmp/tmp-docker-root
RUN /bin/bash -c "shopt -s dotglob; cp -rf /tmp/tmp-docker-root/* /"
RUN rm -rf /tmp/tmp-docker-root
EXPOSE 9000/tcp 9001/tcp 5911/tcp
ENTRYPOINT ["/init.entrypoint"]
CMD ["start"]