问答详情
源自:6-2 docker网络

显示连接失败

docker@default:~$ docker run -d -p 9000:80 daocloud.io/library/nginx
ae79751514aee5ebdae0ad4377724015e15f94ff8712feec2dace930e10f1984

docker@default:~$ docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                  NAMES
ae79751514ae        daocloud.io/library/nginx   "nginx -g 'daemon of…"   46 seconds ago      Up 45 seconds       0.0.0.0:9000->80/tcp   relaxed_jackson

docker@default:~$ netstat -na|grep 9000
tcp        0      0 :::9000                 :::*                    LISTEN


然后访问localhost:9000显示连接失败


提问者:慕哥7353558 2019-05-10 17:14

个回答

  • 慕斯卡2509131
    2019-05-10 19:28:40

    localhost:9000,这里locallhost改为具体的宿主机IP地址,再检查一下localhost:9000这里的冒号不要写成中文状态的