Created
October 5, 2017 10:15
-
-
Save zoltan-nz/6ed1a6fe8c2d3be1733249fe91e71055 to your computer and use it in GitHub Desktop.
developer gui
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 characters
FROM ubuntu:latest | |
RUN apt-get update && apt-get install -y firefox && rm -rf /var/cache/apt/ | |
# Replace 1000 with your user / group id | |
RUN export uid=1000 gid=1000 && \ | |
mkdir -p /home/developer && \ | |
mkdir -p /etc/sudoers.d && \ | |
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \ | |
echo "developer:x:${uid}:" >> /etc/group && \ | |
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \ | |
chmod 0440 /etc/sudoers.d/developer && \ | |
chown ${uid}:${gid} -R /home/developer | |
USER developer | |
ENV HOME /home/developer | |
CMD /usr/bin/firefox -no-remote |
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 characters
docker run -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/home/developer/.Xauthority --net=host --pid=host --ipc=host firefox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment