docker build

nginx Docfile
-----------------------
FROM centos
 
MAINTAINER daniel
 
RUN yum install -y wget
RUN wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
RUN yum install -y nginx
RUN echo "daemon off;" >>/etc/nginx/nginx.conf
 
ADD index.html /usr/share/nginx/html/index.html
EXPOSE 80
 
CMD /usr/sbin/nginx
 
 
------
docker build -t my-nginx:v1 .
 

posted @ 2019-03-27 16:57  DanielYoung  阅读(457)  评论(0编辑  收藏  举报