docker nginx编译安装 Dockerfile

vi Dockerfile

FROM 10.16.2.221:5000/joy/centos-ssh:7.2

RUN mkdir /home/joy/ /home/joy/software/
WORKDIR /home/joy/software/
COPY nginx-1.13.1.tar.gz  ngx_cache_purge-1.3.tar.gz openssl-1.1.0f.tar.gz pcre-8.35.tar.gz zlib-1.2.11.tar.gz /home/joy/software/
ENV PATH $PATH:/home/joy/nginx-1.13.1/sbin
RUN yum install -y gcc gcc-c++ automake pcre pcre-devel zlip zlib-devel openssl openssl-devel
RUN tar xf nginx-1.13.1.tar.gz
RUN tar xf ngx_cache_purge-1.3.tar.gz
RUN tar xf openssl-1.1.0f.tar.gz
RUN tar xf pcre-8.35.tar.gz
RUN tar xf zlib-1.2.11.tar.gz
WORKDIR /home/joy/software/nginx-1.13.1
RUN groupadd joy
RUN useradd -g joy joy
RUN  ./configure --prefix=/home/joy/nginx-1.13.1   --with-pcre=/home/joy/software/pcre-8.35 --with-zlib=/home/joy/software/zlib-1.2.11 --with-openssl=/home/joy/software/openssl-1.1.0f --user=joy --group=joy --with-http_ssl_module --with-http_v2_module --with-http_realip_

你可能感兴趣的:(docker,k8s)