安装docker toolbox
中win7 64bit
我的代码:
docker run --name web -d -p 8000:8000 richarvey/nginx-php-fpm
我看不出在Chrome浏览器中的任何结果。
重新安装docker toolbox
&&重启&&禁用防火墙也无济于事。
192.168.99.100:8000
172.17.0.2:8000
本地主机:8000
docker inspect web | grep IPAddress
节目:
"SecondaryIPAddresses": null,
"IPAddress": "172.17.0.2",
"IPAddress": "172.17.0.2",
跑:
$ docker-machine ls
节目:
NAME ACTIVE DRIVER STATE URL SWARM DO
CKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1
8.06.1-ce
跑:
$ docker ps
节目:
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
更新
docker run --name web -d -p 8000:80 richarvey/nginx-php-fpm
http://192.168.99.100:8000/ < -仅此一个工作!
http://172.17.0.2:8000/
HTTP://本地主机:8000 /
里面泊坞窗,
首先检查是否nginx的运行。
看哪个进程正在使用端口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#