blue serves nginx on host port 8080. api is published on 8090 but nobody can load it. Add more servers and fix api.
Look at the current mappings:
Try to give host port 8080 to a second container and read the error:
sh
docker run -d --name green -p 8080:80 nginx:1.27
docker ps -aThe failed green is left in Created. Remove it and use a free host port. The container port stays 80:
sh
docker rm green
docker run -d --name green -p 8081:80 nginx:1.27
curl -s localhost:8081Run httpd for local use only, and save its mapping:
sh
docker run -d --name admin -p 127.0.0.1:8082:80 httpd:2.4
docker port admin > ~/admin-port.txt
cat ~/admin-port.txtLet Docker choose a host port:
sh
docker run -d --name auto -P nginx:1.27
docker port autoNow api. Read its mapping, then test it:
sh
docker port api
curl localhost:8090nginx listens on 80, not 8080. Recreate api with the same host port and the right container port, then check it with curl -s localhost:8090.