Docker Community Forums

Share and learn in the Docker community.

Host can only communicate with docker if tcpdump process which is listening on docker0 is running

I have a GitLab instance running, but I am unable to curl or ping the container

CONTAINER ID   IMAGE                     COMMAND                  CREATED        STATUS                  PORTS                                                              NAMES
d31649b89354   gitlab/gitlab-ee:latest   "/assets/wrapper"        16 hours ago   Up 15 hours (healthy)   0.0.0.0:443->443/tcp, 0.0.0.0:2200->22/tcp, 0.0.0.0:8000->80/tcp   gitlab_web_1
docker network inspect bridge
[
    {
        "Name": "bridge",
        "Driver": "bridge",
        "EnableIPv6": false,
        "Containers": {
            "d31649b89354209a33095536f13ac67271d5ebb632a9a2cabf41706036f139ea": {
                "Name": "gitlab_web_1",
                "EndpointID": "c3c3514a8eb3b9e9d3773debf39f1388179475941e8c5572c98851c3dfe262f3",
                "MacAddress": "02:42:ac:11:00:02",
                "IPv4Address": "172.17.0.2/16",
                "IPv6Address": ""
            }
        },

When I try to ping the container, I am getting an error.

ping 172.17.0.2
PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data.
From 172.17.0.1 icmp_seq=1 Destination Host Unreachable
From 172.17.0.1 icmp_seq=2 Destination Host Unreachable
From 172.17.0.1 icmp_seq=3 Destination Host Unreachable
From 172.17.0.1 icmp_seq=4 Destination Host Unreachable

While trying to fix the issue, I found out that the while tcpdump -i docker0 process is running, the ping is working successfully. Can someone help me figure out this problem.