Cannot reach docker container running swarm mode in wsl2 - docker

System:
Windows 10 host
Wsl2, Ubuntu 20
Docker running within WSL2
Config:
Docker compose deployed in swarm mode with an overlay network. All ports exposed.
Problem:
I cannot reach my container ( Kibana ) from my windows host ( timeout error )
When i run firefox within wsl via xserv, I can reach it.
When I deploy a compose file not in swarm mode, I can reach the container from my windows host.
I checked the ip v4 addresses of the network and containers but I can't reach any entpoint.
So it seems to be a problem with the overlay network mapping to my host system.
I also tried the ip of the auto generated gw_bridge network with no success.
Is there any further configuration that reach the network / endpoint from my windows hosts browser?

Related

ip address is accessible from docker host, but not from docker container running on the host

There's some virtual machine internal network ip address which is accessible from MAC docker host. This was verified using ping.
However, the same ip address is not accessible from any docker container running on the Docker host.
I tried to run container with --network host, however the ip is still not reachable.
Then, I discovered that none of the VMs reachable from MAC docker host are reachable from any docker container running on it.
How to debug and solve this issue?
External ip addresses (of google.com ) are accessible from the container.
I performed the same test on Linux docker host. The same internal VM ip address was reachable from within the container as well as all other VMs.
It's important to note that MAC docker host is just MAC machine connecting to the network using VPN and thus getting access to internal network VMs.
Linux Docker host is VM itself in the internal network where VMs are located.
I'm using 3.6.0 MAC Docker desktop version and update regularly.

How to access a docker container on host from local VM?

I have a docker container set up on the host with RabbitMQ installed and I'm trying to connect to that container and access the RMQ web UI from a Hyper-V VM. The docker container has a static ip assigned and is connected to a transparent network adapter while the VM is connected to an ethernet network adapter. I am new to networking so I have no idea how to connect the VM to the container. I've tried docker swarm but that gave me a deadline exceeded error so now I'm exploring port forwarding with the docker container or configure the VM to use bridged network mode, both of which I have no experience in. Pinging the docker container from host succeeds and so does pinging the host from VM but not the other way around. Some help would be appreciated.

Connect to Gitlab in Docker Container in VM

On a Windows 7 host, I have a Ubuntu guest inside virtualbox which runs a gitlab docker container. Inside the VM I can connect to the Gitlab inside the browser using localhost:80. How can I make the Gitlab reachable from the host?
So far I tried a port-forwanding in virtualbox which doesn't help. In my host with ipconfig, I see three IPs. One is the hosts public IP, the other two are the VirtualBox Host-Only Networks, which I can successfully ping.

Issues with Network connectivity with Docker

I am facing issues configuring network in docker. Details are given below.
Host Machine:- Ubuntu Server 14.04 LTS 64-bit. IP subnet: 10.0.0.0/16, IP address: 10.0.0.206/16 and default gateway: 10.0.0.1/16. This machine having docker installed (version 1.6.2 build 7c8fca2) and has a default IP in the docker0 bridge of 172.17.42.1/16. However, the container has received the IP as 172.17.0.1. Problems are as follows.
My Host machine and docker container is able to connect with each other and to Internet but any other machines are not able to connect with docker container.
Changing the docker0 bridge IP is temporary and reverts back to 172.17.42.1/16 once every reboot.
I cannot set a static IP address of my container as it changes automatically at every exit or if the host is rebooted. Checked the container's network config file /etc/network/interfaces but doing changes in this file has no effect to its eth0 interface.
In very short, I am not able to connect to the container from outer world (from other physical machines) even when I have configured the networking interface of other machines to connect to docker host and container.
How can I fix this connection problem?
By default, Docker containers can not be accessed from other host. And the IP address is allocated by docker.
You can use "--net=host" when run containers, then the container will share the same IP address with the host node. And the container will be available from other node.
docker run -it --net=host ubuntu bash

I am trying to connect multiple docker containers and host machines to a consul server using weave network

The docker containers are running on different host machine that are running their separate docker deamons. So I am using weave network to connect them. The problem is I don't want to run the consul server on a docker conatiner, I want to run it on a host machine. So how do I add this host machine that is running consul server to a weave network so that other containers can register to consul server.

Resources