Inductive Docker Image Deployment on WSL2

I’m having issues getting designer to let me develop Perspective Screens within Docker on WSL2. I have no issues within my Ubuntu VM. It works great in there.

But once I try to run it in WSL2 Ubuntu instance it gives me the following in designer.

If I try to launch a blank perspective project (no developed screens obviously) it tells me i have exceeded my sessions. There are no active sessions. I’m not sure if that is related but i noticed it. Oddly enough if i go back and create a vision window, it will launch.

Has anyone gotten this to work with WSL2 yet?

Are you opening the designer from the container or from the host computer? If from the host computer, did you do anything special after creating the container?

I have been working with Docker in WSL2 for a few days now, I can get to the gateway web page from the host computer, but not the designer. When I try to add Ignition running in the container to the designer launcher, it says the host is not reachable. My firewall is disabled.

It might be helpful if you posted your docker run statement (or equivalent Compose definition)… This way we’ll know exactly how you’re launching the container and base configuration.

Windows 10 pro with updates recently applied.
WSL2 with no modifications, other than setting WSL version to 2.
Ubuntu 20.04, no modifications

Nothing fancy about the docker run statement…

docker run -p 8088:8088 --name my-ignition -e GATEWAY_ADMIN_PASSWORD=password -e IGNITION_EDITION=full -d kcollins/ignition:8.1.0

Since posting, I have read there is an issue with WSL2 that involves IPv6. I am working with the following to try to resolve the issue, but any other pointers would be great.

https://www.williamjbowman.com/blog/2020/04/25/running-a-public-server-from-wsl-2/

Travis Cox showed me how to fix this in a webinar a couple of weeks ago. I’ll try to post it on Monday when I can take screenshots.

This configuration should indeed be very straight-forward… I’m also assuming you’re running Docker Desktop for Windows? What version of it are you running?

Part of me is wondering if you’ve tried to do a apt install docker.io directly in your WSL2 distro (you do NOT want to do it this way). If so, I’d try wiping your WSL2 distro, install a fresh one (Ubuntu is fine, btw), then install Docker Desktop for Windows. Then you’ll have the full integrations for Docker across Windows and WSL2.

@Kevin.Collins, Thanks!

I did install docker directly in the WSL2 distro. I will undo all that and try with Docker Desktop.

Mack

So the problem lies with the “public ip” setting in 8.1. When you setup the docker instance from the command on the official inductive version, the container is setup to 0.0.0.0 with the appropriate ports. But that makes it an issue when designer goes to start doing its thing since it can’t find 0.0.0.0.

You’ve got to use ifconfig and get the IP assigned to your WSL2 (it’s different EVERY TIME). Go in the gateway and change the public webpage address to your WSL2 IP.

Travis was using Windows and WSL2 to demo 8.1 in an integrator round table and he gladly explained all that. I’m not where I can get to my work laptop but I’ll take some screen shots on Monday when I get into the office to show how I did it.

@Kevin.Collins, switch to Docker Desktop for Windows did indeed fix the port issue. I can now see the gateway web page and open the designer from Windows.

I do have some questions regarding creating volumes in locations that can be backed up. Any pointers would be greatly appreciates.

Thanks!

Glad you’re up and running! Make sure to review the info page on Docker Hub, it should have all of the guidance you need, including information on volume persistence… https://hub.docker.com/r/kcollins/ignition