Skip to content

Docker Help

Kashu edited this page Jul 5, 2023 · 3 revisions

Using GUI Apps with Docker

  1. Allow local X11 connections
xhost local:root
  1. Run docker with options
  • Intel GPU
# Run docker image with following options
docker run --device=/dev/dri:/dev/dri \
    -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY
  • NVIDIA GPU
# Run docker image with following options
docker run  --gpus 'all,"capabilities=compute,utility,graphics"' \
    -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY
  • CPU rendering (without a GPU)
# Run docker image with following options
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY

Copying files from Docker container to host

In order to copy a file from a container to the host, you can use the command

docker cp <containerId>:/file/path/within/container /host/path/target
Clone this wiki locally