-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.weston.chrome
34 lines (24 loc) · 1.42 KB
/
Dockerfile.weston.chrome
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
FROM ubuntu:jammy-20230425
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -y sudo locales weston xwayland winpr-utils freerdp2-wayland wget && \
locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8
RUN apt update && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
DEBIAN_FRONTEND=noninteractive sudo apt install -y ./google-chrome-stable_current_amd64.deb chromium-codecs-ffmpeg-extra
ARG USER=testuser
ARG PASS=1234
RUN useradd -m $USER -p $(openssl passwd $PASS) && \
usermod -aG sudo $USER && \
chsh -s /bin/bash $USER
WORKDIR /home/$USER
RUN sudo -u $USER -g $USER -- winpr-makecert -rdp -path /home/$USER/.config && \
sudo -u $USER -g $USER -- mkdir /tmp/.display && \
sudo -u $USER -g $USER -- chmod 0700 /tmp/.display && \
sudo -u $USER -g $USER -- mkdir /tmp/.X11-unix && \
sudo -u $USER -g $USER -- chmod 1777 /tmp/.X11-unix
RUN echo "#!/bin/sh\n\
sudo -u $USER -g $USER -E -H -- weston --backend=rdp-backend.so --modules=xwayland.so --shell=kiosk-shell.so --rdp-tls-cert=.config/buildkitsandbox.crt --rdp-tls-key=.config/buildkitsandbox.key --socket=wayland-0 &\n\
WAYLAND_DISPLAY=wayland-0 DISPLAY=:0 sudo -u $USER -g $USER -E -H -- google-chrome-stable --no-sandbox --kiosk --disable-gpu" > /startweston && chmod +x /startweston
ENV XDG_RUNTIME_DIR=/tmp/.display
EXPOSE 3389
CMD /startweston & bash