Docker Community Forums

Share and learn in the Docker community.

[CE 18.03 / Ubuntu 16.04]Understanding docker's networking

(Enlightx) #1

I’m having very annoying issues with docker-ce (18.03.1~ce-0~ubuntu)
I use docker compose to run a very simple infrastructure).
Suddenly (can be after 1 minute or 1 week) I cannot reach the container via the port I expose using “ports”

I expose the ports this way:

  • ports:

When the container stops responding on port ABCD, I can still enter it (docker exec etc…)
Inside the container port XYZW is working.

The only way to solve the problem is restarting the container.
docker-compose stop takes eons to stop the container and sometimes it gets a timeout, then a need to kill and remove the container.

Do you have any suggestions to me to better understand what’s happing?