I am setting up Ignition in Docker by following the Container Basics Video at Inductive University. I am running the code in "How To Use This Image" on the official Ignition Docker page:
docker run -d -p 9088:8088 --name ignition-test inductiveautomation/ignition:8.1.26 \
-n docker-test -a localhost -h 9088 -s 9043
The image installs sucessfully, but the container will not start. The log reads:
jvm 1 E [IgnitionServer] : The port(s) 8088, 8060 are unavailable
I don't understand why it is telling me the ports 8088 and 8060 are unavailable when I am trying to connect through 9088. Can someone help me understand / diagnose this problem?
Your command disagrees with itself.
-p 9088:8088 is telling the Docker daemon to expose port 8088 inside the container as port 9088 on the host.
But then you're telling the container to run on port 9088, with
The whole point of using the Docker daemon to remap ports is that the internal service doesn't need to know where it's running; everything the application inside the container knows about thinks it's running on 8088 and everything's fine. The outer "shell" that's running around Docker remaps incoming requests automatically.
I am sorry, I'll need a bit more help understanding this. The command was taken from the official Inductive Automation docker hub, I thought it was supposed to be the "Hello World" of getting Ignition running in a Docker container, and my comprehension of Docker and ports is at a "Hello World" level. What should I change before trying to run it again?
Ah, that's my bad. I was mistaken about what the -h flag does; it tells the internal webserver what port it's should broadcast to external clients, to make sure things line up correctly.
What OS are you running Docker on/have you restarted since you installed it/what's the Docker version?
I am running it on Windows 10. I installed Docker today, so it's on its latest version, Docker Desktop 4.18.0 (104112). I did restart my computer after the Docker installation.
I have had issues with an antivirus that I can't seem to disable on my computer so I would suggest that as a culprit, but I'm not sure how relevant that is to the problem here.
Let's use something else on your new Docker Desktop install to help validate that the fundamentals are working. Try this
docker run statement:
docker run -d --name nginx-test -p 8080:80 nginx:latest
You should then be able to open a web browser in Windows against http://localhost:8080 and see the following:
If that works as expected, you can shut that container down and remove it:
docker stop nginx-test
docker rm nginx-test
If that fails, perhaps there is something more fundamentally wrong on the system config that Ignition (as a container) is falling victim to.
I may have identified the issue. I am also using VMWare on my computer, and when I installed Docker Desktop the Windows Feature "Hyper-V" (Control Panel -> Programs And Features) was not automatically enabled. In the process of trying to restore my computer I found out this must be active for Docker to work, but it will disrupt VMWare if it is.
Others experiencing this issue should first research how to run VMWare and Docker together. If you're trying to get your VMs to work after installing Docker Desktop (like I was) you must disable Hyper-V, Windows Sandbox, and Virtual Machine Platform from Windows Features in the control panel (this requires a computer restart after).
You should be able to run both on modern Windows 10/11 (20H1 and newer) and a reasonably new enough build of VMware Workstation (15.5 and newer, ref: VMware Workstation 15.5 Now Supports Host Hyper-V Mode - VMware Workstation Zealot). I did so on an Intel NUC that I used to have Win 11 on at home here (before I turned it into a Proxmox server ).