Docker - racket/racket GitHub Wiki

Racket docker packages

https://hub.docker.com/r/racket/racket/

More details at

https://github.com/jackfirth/racket-docker


Potential Solution to error message: Gtk initialization failed for display ":0"

If you encounter this error when running racket app in docker, it may be due to the app needing graphical support and your container does not have certain packages installed. The solution requires 2 things to be done:

  1. Install GTK related packages (see Dockerfile which should shows GTK related dependencies packages) in the container
  2. Run the docker app specifying the environmental variable DISPLAY and mounting the host folder /tmp/.X11-unix (see docker command example below): docker run -it --rm \ -e DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ <racket-image>

Note: flag -e DISPLAY and -v /tmp/.X11-unix:/tmp/.X11-unix