http://www.cnblogs.com/WJ--NET/p/8553807.html
#创建文件夹 mkdir centos_nginx cd centos_nginx vim Dockerfile
#指定使用那个基础镜像 FROM centos MAINTAINER Dirk.Wang 510423039@qq.com LABEL Discription="基于centos的nginx镜像" version="1.0" WORKDIR /usr/local/src RUN yum install -y wget RUN wget http://nginx.org/download/nginx-1.8.0.tar.gz RUN tar -zxvf nginx-1.8.0.tar.gz WORKDIR nginx-1.8.0 #安装nginx所依赖的包 RUN yum -y install gcc-c++ RUN yum -y install pcre pcre-devel RUN yum -y install zlib zlib-devel RUN yum -y install openssl openssl-devel libssl-dev RUN ./configure RUN make RUN make install EXPOSE 80
docker build -t centos_nginx .
docker run -dit -p 8085:80 centos_nginx
docker attach loving_haibt
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。