Created
January 8, 2019 12:59
-
-
Save Kuanlin-Chen/516c3155cb69e082518a253b7363f9fe to your computer and use it in GitHub Desktop.
Run Firefox in Docker with GUI.
This file contains 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:18.04 | |
# docker build -t firefox . | |
# docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox | |
# install firefox | |
# -y: assume yes as answer | |
RUN apt-get update && apt-get install -y firefox | |
# add user | |
RUN useradd -ms /bin/bash developer | |
# set the user as developer when running the image | |
USER developer | |
# set HOME directory | |
ENV HOME /home/developer | |
# provide default command for an executing container | |
CMD /usr/bin/firefox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment