# Inductive Docker Image Deployment on WSL2

**URL:** <https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838>\
**Category:** Ignition\
**Created:** [October 20, 2020, 3:37pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838 "2020-10-20T15:37:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![b.peck](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@b.peck](https://forum.inductiveautomation.com/u/b.peck)\
**Post date:** [October 20, 2020, 3:37pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/1 "2020-10-20T15:37:55Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/8/985bc72eeb4912b453302b8b139a459352b5d058.png)

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/a/8a130768ad64e87ec872bdf2644125007fd6b794.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/e/9e852769d2df2deea8b95ba877c2fb3ccd2d227a.png)

Has anyone gotten this to work with WSL2 yet?

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [December 18, 2020, 11:42pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/2 "2020-12-18T23:42:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [December 19, 2020, 4:06am UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/3 "2020-12-19T04:06:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [December 19, 2020, 11:37am UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/4 "2020-12-19T11:37:02Z")

</div>

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…

```auto
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://superuser.com/questions/453298/how-to-force-java-to-use-ipv4-instead-ipv6>

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

> <https://github.com/microsoft/WSL/issues/4150>
>
> \# Issue
> WSL 2 seems to NAT it's virtual network, instead of making it bridged t…o the host NIC. My goal is for a service running in Ubuntu in WSL 2 to be accessible from anywhere on my local network.
> 
> \## Issue Details
> \* Your Windows build number: \`Microsoft Windows \[Version 10.0.18917.1000\]\`
> 
> \* What you're doing and what's happening: 
> Running \`ipconfig\` on my Windows 10 host machine
> \`\`\`
> IPv4 Address. . . . . . . . . . . : 192.168.1.41
> Subnet Mask . . . . . . . . . . . : 255.255.255.0
> Default Gateway . . . . . . . . . : 192.168.1.1
> \`\`\`
> Running \`ifconfig\` in Ubuntu WSL 2
> \`\`\`
> eth0: flags=4163\<UP,BROADCAST,RUNNING,MULTICAST\> mtu 1500
> inet 172.18.72.60 netmask 255.255.0.0 broadcast 172.18.255.255
> \`\`\` 
> 
> Accessing 172.18.72.60 from my Window host does work, however this IP is not accessible from another system on my network.
> 
> \* What's wrong / what should be happening instead:
> I would expect to \`ifconfig\` in Ubuntu WSL 2 to have an IP address in the same network as my host machine.
> 
> \* Searching the docs:
> The only detail I have found about WSL 2 networking is the following that notes that it will have it's own IP and that localhost is something that will be used for WSL 2 in the future.
> https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes
> This is fine, however I would like the IP WSL 2 is getting to be on my local LAN which means I need to configure the virtual NIC to be bridged.
> 
> \# Workaround
> See @edwindijas https://github.com/microsoft/WSL/issues/4150#issuecomment-504209723

---

<div class="post-metadata">

**Author:** ![b.peck](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@b.peck](https://forum.inductiveautomation.com/u/b.peck)\
**Post date:** [December 19, 2020, 12:38pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/5 "2020-12-19T12:38:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [December 19, 2020, 1:03pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/6 "2020-12-19T13:03:15Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/57bc3fd7ba2bcefa54cda4671c390a47b2607230.png)

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.

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [December 19, 2020, 1:27pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/7 "2020-12-19T13:27:58Z")

</div>

@Kevin.Collins, Thanks!

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

Mack

---

<div class="post-metadata">

**Author:** ![b.peck](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@b.peck](https://forum.inductiveautomation.com/u/b.peck)\
**Post date:** [December 19, 2020, 1:32pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/8 "2020-12-19T13:32:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [December 20, 2020, 2:36pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/9 "2020-12-20T14:36:20Z")

</div>

@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!

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [December 20, 2020, 3:37pm UTC](https://forum.inductiveautomation.com/t/inductive-docker-image-deployment-on-wsl2/39838/10 "2020-12-20T15:37:28Z")

</div>

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](https://hub.docker.com/r/kcollins/ignition)
