Docker Community Forums

Share and learn in the Docker community.

Docker `-p` port does not work after reboot

Hello, I have a container that is started like this:

docker run --rm --privileged --net vrops --ip 172.20.0.2 -p 8080:80 -p 8443:443 ${image}

It works fantastic, however, sometimes after a reboot, starting a new container with the same command results in the port forwarding to not work. For example: if I nmap port 8443 against 172.20.0.2, It is open. If I nmap the host’s ip on port 8443, it is “filter” and not allowing me to access my service.

Any ideas?

Centos 7.6.1810 (core) on GCP
Docker version 18.09.3, build 774a1f4