I ran this:
docker run -ti -p 80:80 --name esproxy "$tag"
but I get this error:
docker: Error response from daemon: driver failed programming external connectivity on endpoint esproxy (ead1fa4f09b2326cd1ff6aa0e3b8f8bfa5c9d353eb6db4efef6d188b81ea9df7): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use.
So I did:
root@ip-172-xx-29-110:/interos/repos/nginx# lsof -i:80
and I got:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 28213 root 4u IPv6 64253 0t0 TCP *:http (LISTEN)
and so this process looks like:
root 28213 0.0 0.0 116552 2620 ? Sl 04:34 0:00 /snap/docker/384/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 80 -container-ip 172.17.0.2 -container-port 80
does anybody know what that process is?
I had the same issue.
Stoppping all runing containers and restarting the docker service fixed it for me
service docker restart
and then start your container again
If you notice that after restarting the Docker service, the docker-pr service allocates a container port, this means your container is starting automatically.
To check which containers are currently running:
docker ps
To stop a specific container:
docker stop container_name
If you need to stop all running containers:
docker stop $(docker ps -a -q)
To prevent a container from starting automatically, you need to update its restart policy:
docker update --restart=no container_name
After making this change, you should be able to restart your Docker service without any containers starting automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With