Skip to content

Instantly share code, notes, and snippets.

View ldipenti's full-sized avatar

Lucas Di Pentima ldipenti

View GitHub Profile
@cschiewek
cschiewek / x11_docker_mac.md
Last active November 6, 2024 12:03
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment: