Page 1 of 1

Cannot connect to docker version via browser

PostPosted:Tue Sep 24, 2019 10:46 am
by kalle42
Hello,

This morning I was litte bit more lucky with running the docker version of openkm/openkm-ce under Docker Desktop on my win10 system. From time to time the yesterday postet problem occurred but mostly it startet without severe error messages ...

But my second problem, that I had already mentioned yesterday is still there: I cannot connect to openkm on the virtual machine via a browser. I' m confused a litte. The openkm docker example says connect to http://container-ip:8080/ The first IP-Address I found was the Internal Virtual Switch of Docker Desktop which per default on 10.0.75.0. But connecting to 10.0.75.1:8080 did not work.

Inspecting the docker container brought me to the container-ip 172.17.0.2 and gateway 172.17.0.1. But also 172.17.0.2:8080 does not work. That did not change even if changed the Internal Virtual Switch of Docker Desktop to 172.17.0.0 what leads to in Windows to an Ethernet-Adapter vEthernet (DockerNAT) with IP-Adress 172.17.0.1 instead of 10.0.75.0.
Now I successfully can ping 172.17.0.1 but calling 172.17.0.1:8080 and 172.17.0.2:8080 does still not work and ends with this error message
This website could not be found.
Error Code: INET_E_RESOURCE_NOT_FOUND

I tried Microsoft Edge and also Mozilla FireFox.

Something does not seem to fit right. I would be glad, if someone knew a solution,
Kalle

Re: Cannot connect to docker version via browser

PostPosted:Fri Sep 27, 2019 11:35 am
by bieli
Hello,

I also have running openkm-ce in a Docker container and it's working well.

If you use NAT in the container, then you can call http://docker-ip:8080 (not container-ip!)
But maybe the port is already used in your docker host. So maybe it's better to use another port like 8888.
Starting the container you can change it.

Regards,
Bieli

Re: Cannot connect to docker version via browser

PostPosted:Fri Sep 27, 2019 12:04 pm
by kalle42
Hello bieli,

thank you for your help. I tried a lot in the last week and I learned a lot in the last week.

But the main problem, that prevented the access to openKm in the docker container was the missing port assigning in the docker-hub example
Code: Select all
    $ docker run openkm/openkm-ce
does definitely not run under Windows PowerShell. it has to be
Code: Select all
    $ docker run -p 8080:8080 openkm/openkm-ce
to connect the hosts 8080 port to the exposed 8080 port of the container. It took me some hours over the detour of some less complex containers and comparing and trying to find out why they worked and the openkm container did not.

Finally I was astonished that not it complexity was what made problems.
Anyway, thank you!

Re: Cannot connect to docker version via browser

PostPosted:Fri Sep 27, 2019 2:36 pm
by bieli
Please try to add:

--network=host
Or
--net=host

to your docker run command (depends on your docker version)

Regards,
Stefan