基于centos基础镜像的nginx的Dockerfile分享

# This is nginx
# Version 1.0
FROM centos
MAINTAINER wangxuejin/centos-nginx
ENV PATH /usr/local/nginx/sbin:$PATH
RUN yum clean all
RUN yum install -y gcc gcc-c++ openssl openssl-devel cyrus-sasl-md5 make pcre-devel pcre zlib zlib-devel
WORKDIR /opt/
COPY nginx-1.9.9.tar.gz /opt/
RUN tar xvf nginx-1.9.9.tar.gz
WORKDIR /opt/nginx-1.9.9
RUN ./configure --prefix=/usr/local/nginx --with-http_ssl_module && make && make install
EXPOSE 80
CMD ["nginx"]

发表评论

登录... 后才能评论