Docker Community Forums

Share and learn in the Docker community.

Docker access to host ports

(Pchammer) #1


I am using docker 1.12 (CentOS 7) with 2 service definitions:
docker service create --name mbp10 --network engine --with-registry-auth -p 20081:7080 --mount type=volume,source=/opt/ebank,target=/opt/ebank --env PROCID=MDOC1
docker service create --name ebp10 --network engine --with-registry-auth -p 18081:8080 --mount type=volume,source=/opt/ebank,target=/opt/ebank

Both services are accessible from network, but when i try to connect from container running mbp10 to container ebp10 via (-p 18081:8080) it just won’t work. Any idea why this is not working ?

kr, Milos