install docker toolbox
in win7 64bit
my code:
docker run --name web -d -p 8000:8000 richarvey/nginx-php-fpm
I can't see any result in chrome browser.
reinstall docker toolbox
&& reboot && disable firewall did not help.
192.168.99.100:8000
172.17.0.2:8000
localhost:8000
docker inspect web | grep IPAddress
show:
"SecondaryIPAddresses": null,
"IPAddress": "172.17.0.2",
"IPAddress": "172.17.0.2",
run:
$ docker-machine ls
show:
NAME ACTIVE DRIVER STATE URL SWARM DO
CKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1
8.06.1-ce
run:
$ docker ps
show:
CONTAINER ID IMAGE COMMAND
CREATED
STATUS PORTS
NAMES
65b815ffa17c richarvey/nginx-php-fpm "docker-php-entrypoi" 4 hours ag
o Up 4 hours 80/tcp, 443/tcp, 9000/tcp, 0.0.0.0:8000->8000/tcp
web
update
docker run --name web -d -p 8000:80 richarvey/nginx-php-fpm
http://192.168.99.100:8000/ <-- only this one work!
http://172.17.0.2:8000/
http://localhost:8000/
Inside docker,
first off check if nginx is running.
see which process is using port 80
bash-4.4# ps aux | grep nginx
14 root 0:00 nginx: master process /usr/sbin/nginx -g daemon off; error_
log /dev/stderr info;
15 nginx 0:00 nginx: worker process
16 nginx 0:00 php-fpm: pool www
17 nginx 0:00 php-fpm: pool www
18 nginx 0:00 php-fpm: pool www
29 root 0:00 grep nginx
bash-4.4# netstat -tulpn | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
14/stderr info;
tcp 0 0 :::80 :::* LISTEN
14/stderr info;
bash-4.4#