问答详情
源自:3-2 dockerfile实战

运行镜像后,curl http://localhost 为什么拒绝连接

https://img2.mukewang.com/5b6ffc560001cb3d04920037.jpg


https://img3.mukewang.com/5b6ffc790001f0de04360046.jpg

Dockerfile如下:

FROM ubuntu

MAINTAINER xbf

RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list  

RUN apt-get update

RUN apt-get install -y nginx

COPY index.html /var/www/html

ENTRYPOINT ["/usr/sbin/nginx","-g","daemo off;"]

EXPOSE 80


提问者:慕粉studying 2018-08-12 17:26

个回答

  • 放丶
    2018-08-17 16:29:46

    进容器看看nginx有没正常安装、启动