I'm using Docker Desktop for Mac and running a container on my host machine. I'm able to access the container via localhost on host machine. But it is not available from other systems on lan.
The container is nginx web server, which is accessible on localhost:80
but not accessible from other systems on same LAN network.
I want other systems to be able to access the container on host machine.
Edit 1: Adding docker-compose configuration and "docker info" command output
version: '2'
services:
nginx:
image: artifactory.service.dev:5000/nginx:latest
network_mode: host
ports:
- "80:80"
- "10001-10020:10001-10020"
- "8080:8080"
volumes:
- ~/docker/.docker/nginx/html:/usr/share/nginx/html
redis:
image: artifactory.service.dev:5000/redis:latest
restart: always
ports:
- "6379:6379"
activemq:
image: artifactory.service.dev:5000/rmohr/activemq:5.11.1
restart: always
ports:
- "61613:61613"
- "61616:61616"
- "8161:8161"
oracle:
image: artifactory.service.dev:5000/oracle-12c:latest
restart: always
ports:
- "1521:1521"
volumes:
- ~/docker/.docker/oracle:/tmp/oracle:ro
privileged: true
docker info
Containers: 4
Running: 3
Paused: 0
Stopped: 1
Images: 38
Server Version: 1.12.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 310
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host bridge null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.19-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 6
Total Memory: 11.71 GiB
Name: moby
ID: LBLG:7UQC:W67Q:J744:QAHE:4JLX:QRVB:2QQD:PTB2:MV75:HD6Y:FROD
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 50
Goroutines: 72
System Time: 2016-09-01T06:51:40.063477725Z
EventsListeners: 1
No Proxy: *.local, 169.254/16, *.dev
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
artifactory.service.dev:5000
127.0.0.0/8
command used to start the container:
docker-compose up -d nginx