forked from docker-gui-images/docker-novnc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.arm64-2404
59 lines (53 loc) · 2.09 KB
/
Dockerfile.arm64-2404
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
58
59
# 端口规划
# 9000 - nginx
# 9001 - websocketify
# 5911 - tigervnc
# based on ubuntu 24.04 LTS
FROM ubuntu:24.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 xz-utils \
ca-certificates wget locales \
nginx sudo apache2-utils \
xorg openbox python-is-python3 stalonetray \
python3 python3-pip rxvt-unicode && \
pip3 install --break-system-packages numpy && \
wget -O - https://github.com/just-containers/s6-overlay/releases/download/v3.2.0.0/s6-overlay-noarch.tar.xz | xz -d | tar -xv && \
wget -O - https://github.com/just-containers/s6-overlay/releases/download/v3.2.0.0/s6-overlay-aarch64.tar.xz | xz -d | tar -xv && \
# workaround for https://github.com/just-containers/s6-overlay/issues/158
ln -s /init /init.entrypoint && \
wget -O /tmp/tigervncserver.deb https://sourceforge.net/projects/tigervnc/files/stable/1.14.0/ubuntu-24.04LTS/arm64/tigervncserver_1.14.0-1ubuntu1_arm64.deb/download && \
apt-get install -f -y /tmp/tigervncserver.deb && \
locale-gen en_US.UTF-8 && \
mkdir -p /app/src && \
git clone --depth=1 --branch v1.5.0 https://github.com/novnc/noVNC.git /app/src/novnc && \
git clone --depth=1 --branch v0.12.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-2404 /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"]