search

Home  >  Q&A  >  body text

dockerfile - Docker doesn't show port mapping?

Then they are all entered according to an example on the Internet
dockerfile:
FROM ubuntu:14.04
MAINTAINER Chris Chan "chenx1242@163.com"
ENV REFRESHED_AT 2016-12-05
RUN apt-get -y update && apt-get install -y nginx
RUN mkdir -p /var/www/html/website
ADD nginx/global.conf /etc/nginx/conf.d/
ADD nginx/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80

PHP中文网PHP中文网2732 days ago941

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-06-06 09:54:29

    If your container status is exited, there must be no port mapping. Is there something missing at the end of your dockerfile, such as: CMD service nginx start

    reply
    0
  • Cancelreply