forked from siomiz/chrome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (50 loc) · 2.03 KB
/
Dockerfile
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
FROM ubuntu:22.04
LABEL maintainer="Tomohisa Kusano <[email protected]>"
ENV VNC_SCREEN_SIZE=1024x768
ENV CHROME_OPTS_OVERRIDE="https://www.bbc.co.uk --user-data-dir=/config --no-sandbox --no-default-browser-check --window-position=0,0 --force-device-scale-factor=1 --disable-dev-shm-usage"
COPY copyables /
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
gnupg2 \
fonts-noto-cjk \
pulseaudio \
supervisor \
x11vnc \
fluxbox \
eterm
ADD https://dl.google.com/linux/linux_signing_key.pub \
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb \
/tmp/
RUN apt-key add /tmp/linux_signing_key.pub \
&& dpkg -i /tmp/google-chrome-stable_current_amd64.deb \
|| dpkg -i /tmp/chrome-remote-desktop_current_amd64.deb \
|| DEBIAN_FRONTEND=noninteractive apt-get -f --yes install
RUN apt-get clean \
&& rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/* /tmp/* \
&& useradd -m -G chrome-remote-desktop,pulse-access chrome \
&& usermod -s /bin/bash chrome \
&& ln -s /crdonly /usr/local/sbin/crdonly \
&& ln -s /update /usr/local/sbin/update \
&& mkdir -p /home/chrome/.config/chrome-remote-desktop \
&& mkdir -p /home/chrome/.fluxbox \
&& mkdir -p /config \
&& mkdir -p /config/Default \
&& mkdir -p /home/chrome/Downloads \
&& echo ' \n\
session.screen0.toolbar.visible: false\n\
session.screen0.fullMaximization: true\n\
session.screen0.maxDisableResize: true\n\
session.screen0.maxDisableMove: true\n\
session.screen0.defaultDeco: NONE\n\
' >> /home/chrome/.fluxbox/init \
&& chown -R chrome:chrome /home/chrome/.config /home/chrome/.fluxbox /config /config/Default /home/chrome/Downloads
VOLUME /config/Default
VOLUME /home/chrome/Downloads
USER chrome
WORKDIR /tmp
EXPOSE 5900
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]