docker: Error response from daemon: driver failed programming external connectivity on endpoint pedantic_pare (00f58d7e7bce14c780dd6b9d689be8586a3c4230ae71b6598ee88252782c0fb1): Bind for 0.0.0.0:80 failed: port is already allocated.
rons-iMac:.ssh ronnats$ docker container run -d -p 8080:80 nginx
The problem is clearly stated in the error message. You are trying to bind with a port that is already allocated. Use a different port. For example (if port 81 is still free)
docker container run -d -p 81:80 nginx
rons-iMac:~ ronnats$ docker container run --publish 8088:80 nginx . ditto
rons-iMac:~ ronnats$ docker container run -p 80:80 nginx
docker: Error response from daemon: driver failed programming external connectivity on endpoint practical_brahmagupta (eec8c6d70f9ba91589dad2c2013476fdb869f55c3edaf0cfe821a5e2ec550ec0): Bind for 0.0.0.0:80 failed: port is already allocated.
ERRO[0000] error waiting for container: context canceled
rons-iMac:~ ronnats$ docker container run --publish 81:80 nginx . ditto
checked docker ps only one shows
rons-iMac:~ ronnats$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ecef09eb5aed nginx “nginx -g 'daemon of…” 8 minutes ago Up 8 minutes 0.0.0.0:80->80/tcp wonderful_sinoussi