docker.exe error response from daemon driver failed programming external connectivity on endpoint

description: fix docker error response from daemon: driver failed programming external connectivity on endpoint

check the port will be used in the container

1
2
3
docker ps 
# or
docker port <container_name>

check the same port used by other containers

1
docker ps

option1 stop the containers used the port

1
sudo docker stop <container_id>

if not fixed, the port could be occupied by other services

1
netstat -tulpn | grep :<port_no>

option2 stop the services

option3 start the container with another port