Docker Community Forums

Share and learn in the Docker community.

Launch Chrome as GUI in Docker Container

Hi Team,

Is there any possible way to Launch Chrome as GUI in Docker Container.If any possible way is there please suggest!!!


Say your ip address is

You can set up a tunnel to you X display on i.e. port 6010, (which corresponds to display with socat. For security, the range argument asks socat to only accept connections from your machine’s IP address.

socat TCP-LISTEN:6010,reuseaddr,fork,range= UNIX-CLIENT:"$DISPLAY" &
Now you can set the DISPLAY variable inside the docker container with -e when you start it.

docker run -e DISPLAY= gns3/xeyes
In the case of chrome there are some more complications, described in the linked post, because chrome requires some more privileges (i.e. add --privileged )