-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.almalinux8
74 lines (63 loc) · 2.22 KB
/
Dockerfile.almalinux8
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM almalinux/8-init
USER 0
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
TERM=xterm
# Install supervisor, VNC, & X11 packages
RUN set -ex;
RUN dnf update -y;
RUN dnf install -y epel-release;
# xautolock tightvncpasswd \
RUN dnf install -y \
bash bash-completion \
novnc supervisor x11vnc oathtool \
tigervnc tigervnc-server \
remmina wget netcat net-tools telnet openssh-clients dnsutils whois traceroute \
procps file gawk sed less bzip2 zip unzip unrar-free xz \
lightdm gnome-shell gnome-session gnome-terminal dbus-x11 mousepad gnome-calculator \
google-noto-cjk-fonts-common google-noto-sans-cjk-ttc-fonts google-noto-serif-cjk-ttc-fonts ibus-table-chinese-quick \
vim man-db tmux git python3-pip sshpass gnupg firefox chromium
RUN groupadd -g 1001 novnc
RUN useradd -m -s /bin/bash -u 1001 -g 1001 novnc
RUN groupadd docker || true
RUN usermod -aG docker novnc || true
COPY ./app /app
COPY ./almalinux/rootfs/home/novnc /app/rootfs/home/novnc
RUN find /app -type d -exec chmod 755 {} \;
RUN find /app -type f -exec chmod g-w {} \;
RUN tar -C /app/rootfs -cf - . | tar -C / -xf -
RUN mv /app/noVNC /noVNC
RUN chmod 700 /app
RUN fc-cache -f
RUN dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
RUN dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
RUN dnf install -y code
RUN if [ "$(arch)" = "x86_64" ]; then \
dnf install -y microsoft-edge-stable google-chrome-stable; \
fi
RUN dnf clean all
RUN systemctl set-default graphical.target
RUN systemctl disable gdm
RUN systemctl enable lightdm
RUN systemctl enable supervisord
RUN systemctl unmask systemd-logind
# re-run it to avoid /usr/local/bin/code removed while installing it
RUN tar -C /app/rootfs -cf - . | tar -C / -xf -
RUN mv /app/entrypoint.sh.almalinux /app/entrypoint.sh
# Setup demo environment variables
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
TERM=xterm \
GTK_IM_MODULE=ibus \
XMODIFIERS=@im=ibus \
QT_IM_MODULE=ibus \
DISPLAY=:0.0 \
DISPLAY_WIDTH=3840 \
DISPLAY_HEIGHT=2560 \
NOVNC_PORT=6080 \
SSL_NOVNC_PORT=6901 \
VNC_PW=novnc
EXPOSE $NOVNC_PORT
ENTRYPOINT ["/app/entrypoint.sh"]