Table of Contents

Docker Quick How-to

Well, I use Debian. A lot of things use Ubuntu. For the sake of laziness, I decided to use Docker to run an Ubuntu image. Originally, I installed docker to run Pokemon Go bots.

Basic commands

docker ps

docker ps -a

docker run -it ubuntu:16.04 /bin/bash

docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix /bin/bash

docker start -a -i 9bb21badced9

docker rm `docker ps –no-trunc -aq`

Run Docker with GUI support

Please note that you cannot run xterm as root.

docker run -it --env="DISPLAY" --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" ubuntu:16.04 /bin/bash

Running Docker with GPU support

docker run -it --env="DISPLAY" --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --device /dev/nvidia0:/dev/nvidia0 --device /dev/nvidiactl:/dev/nvidiactl --device /dev/nvidia-uvm:/dev/nvidia-uvm ubuntu:16.04 /bin/bash

http://stackoverflow.com/questions/25185405/using-gpu-from-a-docker-container