Last active
February 5, 2016 07:51
-
-
Save pop/29e7e829341d58abe370 to your computer and use it in GitHub Desktop.
"You got Firefox in my Docker!"
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 debian:latest | |
RUN apt-get update | |
RUN apt-get -y install iceweasel | |
ENV DISPLAY :0 | |
CMD iceweasel |
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
#!/bin/bash | |
SETUP_DIR=$HOME/bin/docker-firefox | |
XSOCK=/tmp/.X11-unix/X0 | |
if [[ $@ == '--help' || $@ == "-h" ]] | |
then | |
cat $SETUP_DIR/help.txt | |
else | |
cd $SETUP_DIR | |
if [[ $@ == "--build" || $@ == "-b" ]] | |
then | |
docker pull debian:latest | |
docker build -t firefox - < $SETUP_DIR/Dockerfile | |
fi | |
xhost +localhost | |
docker run -v $XSOCK:$XSOCK firefox | |
fi |
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
Firefox* in Docker | |
ff-docker [[--help|-h] [--build|-b]] | |
-h or --help Prints this help message | |
-b or --build Does a full build from scratch (necessary for first-time-use) | |
*Actually Iceweasel because it runs debian... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment