Service Exposed from Docker Conatiner is not available

Hey Team,

We have installed docker on Centos 7.9.2009.

Environment: OS: Centos 7.9.2009 x86_64 Docker version:
Docker version 19.03.9
Docker Compose Version: docker-compose version 1.26.2
Kernel Version:3.10.0-1160

Container is running on the server which is part of VPN and has no internet.

When i do ls0f -i:8200, when vault is running on the container
docker-pr 72680 root 4u IPv6 0t0 TCP *:trivnet1 (LISTEN)

Is it because of IPV6?

We are running a container and exposed the port 8200 in the container to host port 8200.

The service exposed on port 8200 is accessible only for 5 to 10 mins. After 10 mins we are unable to access the service.
Once we restart the docker deamon on the server (i.e systemctl stop docker followed by systemctl start docker),then we are again able to access the service. But after 5 to 10 mins the service is not available.

Can anyone help me in understanding why i am facing this issue.

1 Like

Issue was resolved, by adding the parameter network_mode:host and by removing the port mappings.

Can we use network_mode as host in production?

1 Like