Hey all,
I’ve recently gotten into playing around with docker, and all the concepts seem simple enough, but I’ve been having some trouble as I attempt to run Firefox in a container on my windows machine.
Currently, I’ve got a very simple Dockerfile set up in a dedicated folder, with the following commands:
FROM ubuntu:14.04
RUN apt-get update && apt-get install -y firefox
CMD /usr/bin/firefox
From what I’ve found, I need an xorg x11 display server set up on the host machine to be able to display the UI, not problem. So I have Xlaunch installed, and I have it set up to Disable access control and with all other options left as default. I build my image using “docker build -t firefox .”, and I’m trying to run it using “docker run -ti --rm -e DISPLAY=$DISPLAY firefox”. I also configured my environemnt DISPLAY variable using “set-variable -name DISPLAY -value YOUR-IP:0.0”, with YOUR-IP subsituted for the IP of my machines Wireless LAN adapter - “WiFi”, but I’ve also experimented with all the other IP’s of my other adapters shown when I use ipconfig to no avail.
With this setup, I continually get the error:
error: XDG_RUNTIME_DIR not set in the environment.
Error: cannot open display: YOUR-IP:0.0
I’ve checked everywhere for the solution for this, but to no avail. Here’s the link to the main tutorial I used for the commands and process:
Host:
Windows 11
Lenovo Yoga L390
Client:
Fedora 41 with Firefox browser
Does anyone know how to fix this issue? I haven’t been able to solve it even after looking at multiple other posts on different forums, I’d be grateful for the help. If there’s any more info I need to supply, let me know and I’ll append it.