| # debian.sh --arch 'arm64' out/ 'bookworm' '@1754870400' |
| ARG OPENRESTY_PREFIX=/usr/local/openresty |
| ARG NGINX_USER=nginx |
| ARG NGINX_CONF_DIR=/etc/nginx |
| ARG NGINX_CONF_D_DIR=/etc/nginx/conf.d |
| ARG NGINX_STREAM_DIR=/etc/nginx/stream.d |
| ARG GEOIP_DATA_DIR=/usr/share/GeoIP |
| ENV OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP GEOIP_AUTO_DOWNLOAD=true LD_LIBRARY_PATH= GEOIP_SHORTLINK_BASE=https://git.io |
| RUN |6 OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP /bin/sh -c apt-get update && apt-get install -y --no-install-recommends ca-certificates curl libpcre3 libssl3 zlib1g libmaxminddb0 libgeoip1 libmariadb3 && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |6 OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP /bin/sh -c apt-get update && apt-get install -y --no-install-recommends gosu && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |6 OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP /bin/sh -c useradd -r -s /usr/sbin/nologin ${NGINX_USER} # buildkit |
| RUN |6 OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP /bin/sh -c mkdir -p ${NGINX_CONF_DIR} ${NGINX_CONF_D_DIR} ${NGINX_STREAM_DIR} ${GEOIP_DATA_DIR} /var/log/nginx /run/nginx /etc/nginx/modules-{available,enabled} /etc/nginx/sites-{available,enabled} # buildkit |
| COPY /usr/local/openresty /usr/local/openresty # buildkit |
| COPY /opt/otel-libs /opt/otel-libs # buildkit |
| ENV LD_LIBRARY_PATH=/opt/otel-libs: |
| COPY docker/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf # buildkit |
| COPY docker/entrypoint.sh /entrypoint.sh # buildkit |
| RUN |6 OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP /bin/sh -c chmod +x /entrypoint.sh # buildkit |
| RUN |6 OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP /bin/sh -c test -f ${OPENRESTY_PREFIX}/nginx/modules/ngx_otel_module.so # buildkit |
| RUN |6 OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP /bin/sh -c ln -sfn "${NGINX_CONF_D_DIR}" "${OPENRESTY_PREFIX}/nginx/conf/conf.d" && ln -sfn "${NGINX_STREAM_DIR}" "${OPENRESTY_PREFIX}/nginx/conf/stream.d" # buildkit |
| RUN |6 OPENRESTY_PREFIX=/usr/local/openresty NGINX_USER=nginx NGINX_CONF_DIR=/etc/nginx NGINX_CONF_D_DIR=/etc/nginx/conf.d NGINX_STREAM_DIR=/etc/nginx/stream.d GEOIP_DATA_DIR=/usr/share/GeoIP /bin/sh -c mkdir -p ${OPENRESTY_PREFIX}/nginx/logs ${OPENRESTY_PREFIX}/nginx/client_body_temp && mkdir -p /var/cache/nginx/{client_temp,proxy_temp,fastcgi_temp,uwsgi_temp,scgi_temp} /var/log/nginx /run/nginx && chown -R ${NGINX_USER}:${NGINX_USER} ${OPENRESTY_PREFIX}/nginx /var/cache/nginx /var/log/nginx /run/nginx # buildkit |
| EXPOSE map[443/tcp:{} 80/tcp:{}] |
| HEALTHCHECK &{["CMD-SHELL" "curl -fsS http://127.0.0.1/status || exit 1"] "30s" "3s" "0s" "0s" '\x05'} |
| ENTRYPOINT ["/entrypoint.sh"] |
| CMD ["/usr/local/openresty/nginx/sbin/nginx" "-g" "daemon off;"] |