ARG NGINX_VERSION=1.28.2 #FROM registry.openanolis.cn/openanolis/anolisos:8.6 FROM registry.openanolis.cn/openanolis/anolisos:8.10 ARG NGINX_VERSION ADD nginx-${NGINX_VERSION}.tar.gz /usr/local/ RUN yum -y install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel make libnghttp2 && \ useradd -M nginx && \ cd /usr/local/nginx-${NGINX_VERSION}/ && \ ./configure --with-http_ssl_module --with-http_secure_link_module && make && make install && \ mkdir -pv /usr/local/nginx/conf/conf.d && \ mkdir -pv /storage/nginx_logs/ && chown -R nginx:nginx /storage/nginx_logs && \ echo "ok" > /usr/local/nginx/html/index.html && \ rm -rf /usr/local/nginx-${NGINX_VERSION} COPY nginx.conf /usr/local/nginx/conf/ COPY localhost.conf /usr/local/nginx/conf/conf.d/ COPY 404.html 50x.html /usr/local/nginx/html EXPOSE 80 443 CMD ["/usr/local/nginx/sbin/nginx","-g","daemon off;"]