Created
February 25, 2023 06:08
-
-
Save ndunks/4682237e43d9252e6726c4d07e681f91 to your computer and use it in GitHub Desktop.
Revisions
-
ndunks created this gist
Feb 25, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ FROM ubuntu:16.04 RUN apt-get update && apt-get install -y chromium-browser RUN export uid=1000 gid=1000 && \ mkdir -p /home/user && \ echo "user:x:${uid}:${gid}:User,,,:/home/user:/bin/bash" >> /etc/passwd && \ echo "user:x:${uid}:" >> /etc/group && \ echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ chown "${uid}:${gid}" -R /home/user # chmod 0440 /etc/sudoers.d/user && \ RUN apt install xauth USER user ENV HOME /home/user CMD '/bin/bash' #CMD ['chromium-browser', '--no-sandbox'] # docker build -t chromium . # docker run --net=host --name chrome -it --rm -e DISPLAY=$DISPLAY -e XAUTHORITY=$XAUTHORITY -v $XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR chromium