Posts

Showing posts with the label Docker

Docker quick start (Firefox container as an example)

Below are the minimal commands needed to get a working Mozilla Firefox docker container in Ubuntu. Install docker client and server sudo apt-get install docker.io Allow the docker user to communicate with your X session xhost +local:docker Download a Firefox docker image and start it as a container sudo docker run -v $HOME/Downloads:/home/firefox/Downloads:.rw -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/snd:/dev/snd --privileged -e uid=$(id -u) -e gid=$(id -g) -e DISPLAY=unix$DISPLAY --name firefox chrisdaish/firefox Once the image has been downloaded, it can be started with the following command instead: sudo docker r un -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/snd:/dev/snd --privileged -e uid=$(id -u) -e gid=$(id -g) -e DISPLAY=unix$DISPLAY --name firefox chrisdaish/firefox Note the id or name of the container. Later if you want to get back to the container, you need that id. sudo docker attach [id or name] sudo docker start [id or name> Before you can run again, ...