Skip to content

docker_graphics_macos

Colley JM edited this page Aug 21, 2023 · 21 revisions

MacOS configuration to enable graphics of Docker of linux image

  • XQuartz installation
  • restart computer
  • install Docker with your CPU version
  • in the Docker application go to preferences > resources and add more memory
  • X11 preference security, select "Allow connection from network clients"
  • restart Docker application
  • retrieve your <IP> address (inet) in a Terminal shell with:
ifconfig en0
  • open a Terminal shell within the XQuartz application (only needed for this step) and add
xhost +

or

xhost <IP>
  • add this option to the docker run command when creating a container
-e DISPLAY=<IP>:0

Check

python -m tkinter

Reference

Watch this video