镜像构建历史
# 2024-12-23 09:07:41 0.00B 指定运行容器时使用的用户
USER 101
# 2024-12-23 09:07:41 31.49MB 执行命令并创建新的镜像层
RUN |2 UID=101 GID=101 /bin/sh -c set -x && apkArch="$(cat /etc/apk/arch)" && nginxPackages=" nginx=${NGINX_VERSION}-r${PKG_RELEASE} nginx-module-xslt=${NGINX_VERSION}-r${DYNPKG_RELEASE} nginx-module-geoip=${NGINX_VERSION}-r${DYNPKG_RELEASE} nginx-module-image-filter=${NGINX_VERSION}-r${DYNPKG_RELEASE} nginx-module-njs=${NGINX_VERSION}.${NJS_VERSION}-r${NJS_RELEASE} " && apk add --no-cache --virtual .checksum-deps openssl && case "$apkArch" in x86_64|aarch64) apk add -X "https://nginx.org/packages/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache $nginxPackages ;; *) set -x && tempDir="$(mktemp -d)" && chown nobody:nobody $tempDir && apk add --no-cache --virtual .build-deps gcc libc-dev make openssl-dev pcre2-dev zlib-dev linux-headers libxslt-dev gd-dev geoip-dev libedit-dev bash alpine-sdk findutils curl && su nobody -s /bin/sh -c " export HOME=${tempDir} && cd ${tempDir} && curl -f -L -O https://github.com/nginx/pkg-oss/archive/${NGINX_VERSION}-${PKG_RELEASE}.tar.gz && PKGOSSCHECKSUM=\"b5d8ad59567a5df18f134236c4e22a339229cd56f4b2ae8d1b77a17f3dcfb16672103bd9191d419acf93c90e866b59417aad26ad7710d9dcc53bf38d1f88d764 *${NGINX_VERSION}-${PKG_RELEASE}.tar.gz\" && if [ \"\$(openssl sha512 -r ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz)\" = \"\$PKGOSSCHECKSUM\" ]; then echo \"pkg-oss tarball checksum verification succeeded!\"; else echo \"pkg-oss tarball checksum verification failed!\"; exit 1; fi && tar xzvf ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz && cd pkg-oss-${NGINX_VERSION}-${PKG_RELEASE} && cd alpine && make module-geoip module-image-filter module-njs module-xslt && apk index --allow-untrusted -o ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz ${tempDir}/packages/alpine/${apkArch}/*.apk && abuild-sign -k ${tempDir}/.abuild/abuild-key.rsa ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz " && cp ${tempDir}/.abuild/abuild-key.rsa.pub /etc/apk/keys/ && apk del --no-network .build-deps && apk add -X ${tempDir}/packages/alpine/ --no-cache $nginxPackages ;; esac && apk del --no-network .checksum-deps && if [ -n "$tempDir" ]; then rm -rf "$tempDir"; fi && if [ -f "/etc/apk/keys/abuild-key.rsa.pub" ]; then rm -f /etc/apk/keys/abuild-key.rsa.pub; fi && apk add --no-cache curl ca-certificates # buildkit
# 2024-12-23 09:07:41 0.00B 指定运行容器时使用的用户
USER root
# 2024-12-23 09:07:41 0.00B 定义构建参数
ARG GID=101
# 2024-12-23 09:07:41 0.00B 定义构建参数
ARG UID=101
# 2024-12-23 09:07:41 0.00B 设置环境变量 NJS_RELEASE
ENV NJS_RELEASE=1
# 2024-12-23 09:07:41 0.00B 设置环境变量 NJS_VERSION
ENV NJS_VERSION=0.8.5
# 2024-12-23 08:03:47 0.00B 设置默认要执行的命令
CMD ["nginx" "-g" "daemon off;"]
# 2024-12-23 08:03:47 0.00B 指定运行容器时使用的用户
USER 101
# 2024-12-23 08:03:47 0.00B 设置停止容器时发送的系统调用信号
STOPSIGNAL SIGQUIT
# 2024-12-23 08:03:47 0.00B 声明容器运行时监听的端口
EXPOSE map[8080/tcp:{}]
# 2024-12-23 08:03:47 0.00B 配置容器启动时运行的命令
ENTRYPOINT ["/docker-entrypoint.sh"]
# 2024-12-23 08:03:47 4.62KB 复制新文件或目录到容器中
COPY 30-tune-worker-processes.sh /docker-entrypoint.d # buildkit
# 2024-12-23 08:03:47 3.01KB 复制新文件或目录到容器中
COPY 20-envsubst-on-templates.sh /docker-entrypoint.d # buildkit
# 2024-12-23 08:03:47 389.00B 复制新文件或目录到容器中
COPY 15-local-resolvers.envsh /docker-entrypoint.d # buildkit
# 2024-12-23 08:03:47 2.13KB 复制新文件或目录到容器中
COPY 10-listen-on-ipv6-by-default.sh /docker-entrypoint.d # buildkit
# 2024-12-23 08:03:47 1.62KB 复制新文件或目录到容器中
COPY docker-entrypoint.sh / # buildkit
# 2024-12-23 08:03:47 10.65KB 执行命令并创建新的镜像层
RUN |2 UID=101 GID=101 /bin/sh -c sed -i 's,listen 80;,listen 8080;,' /etc/nginx/conf.d/default.conf && sed -i '/user nginx;/d' /etc/nginx/nginx.conf && sed -i 's,/var/run/nginx.pid,/tmp/nginx.pid,' /etc/nginx/nginx.conf && sed -i "/^http {/a \ proxy_temp_path /tmp/proxy_temp;\n client_body_temp_path /tmp/client_temp;\n fastcgi_temp_path /tmp/fastcgi_temp;\n uwsgi_temp_path /tmp/uwsgi_temp;\n scgi_temp_path /tmp/scgi_temp;\n" /etc/nginx/nginx.conf && chown -R $UID:0 /var/cache/nginx && chmod -R g+w /var/cache/nginx && chown -R $UID:0 /etc/nginx && chmod -R g+w /etc/nginx # buildkit
# 2024-12-23 08:03:47 9.47MB 执行命令并创建新的镜像层
RUN |2 UID=101 GID=101 /bin/sh -c set -x && addgroup -g $GID -S nginx || true && adduser -S -D -H -u $UID -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx || true && apkArch="$(cat /etc/apk/arch)" && nginxPackages=" nginx=${NGINX_VERSION}-r${PKG_RELEASE} " && apk add --no-cache --virtual .checksum-deps openssl && case "$apkArch" in x86_64|aarch64) set -x && KEY_SHA512="e09fa32f0a0eab2b879ccbbc4d0e4fb9751486eedda75e35fac65802cc9faa266425edf83e261137a2f4d16281ce2c1a5f4502930fe75154723da014214f0655" && wget -O /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub && if echo "$KEY_SHA512 */tmp/nginx_signing.rsa.pub" | sha512sum -c -; then echo "key verification succeeded!"; mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; else echo "key verification failed!"; exit 1; fi && apk add -X "https://nginx.org/packages/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache $nginxPackages ;; *) set -x && tempDir="$(mktemp -d)" && chown nobody:nobody $tempDir && apk add --no-cache --virtual .build-deps gcc libc-dev make openssl-dev pcre2-dev zlib-dev linux-headers bash alpine-sdk findutils curl && su nobody -s /bin/sh -c " export HOME=${tempDir} && cd ${tempDir} && curl -f -L -O https://github.com/nginx/pkg-oss/archive/${NGINX_VERSION}-${PKG_RELEASE}.tar.gz && PKGOSSCHECKSUM=\"b5d8ad59567a5df18f134236c4e22a339229cd56f4b2ae8d1b77a17f3dcfb16672103bd9191d419acf93c90e866b59417aad26ad7710d9dcc53bf38d1f88d764 *${NGINX_VERSION}-${PKG_RELEASE}.tar.gz\" && if [ \"\$(openssl sha512 -r ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz)\" = \"\$PKGOSSCHECKSUM\" ]; then echo \"pkg-oss tarball checksum verification succeeded!\"; else echo \"pkg-oss tarball checksum verification failed!\"; exit 1; fi && tar xzvf ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz && cd pkg-oss-${NGINX_VERSION}-${PKG_RELEASE} && cd alpine && make base && apk index --allow-untrusted -o ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz ${tempDir}/packages/alpine/${apkArch}/*.apk && abuild-sign -k ${tempDir}/.abuild/abuild-key.rsa ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz " && cp ${tempDir}/.abuild/abuild-key.rsa.pub /etc/apk/keys/ && apk del --no-network .build-deps && apk add -X ${tempDir}/packages/alpine/ --no-cache $nginxPackages ;; esac && apk del --no-network .checksum-deps && if [ -n "$tempDir" ]; then rm -rf "$tempDir"; fi && if [ -f "/etc/apk/keys/abuild-key.rsa.pub" ]; then rm -f /etc/apk/keys/abuild-key.rsa.pub; fi && apk add --no-cache --virtual .gettext gettext && mv /usr/bin/envsubst /tmp/ && runDeps="$( scanelf --needed --nobanner /tmp/envsubst | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' | sort -u | xargs -r apk info --installed | sort -u )" && apk add --no-cache $runDeps && apk del --no-network .gettext && mv /tmp/envsubst /usr/local/bin/ && apk add --no-cache tzdata && ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log && mkdir /docker-entrypoint.d # buildkit
# 2024-12-23 08:03:47 0.00B 定义构建参数
ARG GID=101
# 2024-12-23 08:03:47 0.00B 定义构建参数
ARG UID=101
# 2024-12-23 08:03:47 0.00B 设置环境变量 DYNPKG_RELEASE
ENV DYNPKG_RELEASE=2
# 2024-12-23 08:03:47 0.00B 设置环境变量 PKG_RELEASE
ENV PKG_RELEASE=1
# 2024-12-23 08:03:47 0.00B 设置环境变量 NGINX_VERSION
ENV NGINX_VERSION=1.26.2
# 2024-12-23 08:03:47 0.00B 添加元数据标签
LABEL maintainer=NGINX Docker Maintainers <docker-maint@nginx.com>
# 2024-09-06 20:05:36 0.00B 设置默认要执行的命令
CMD ["/bin/sh"]
# 2024-09-06 20:05:36 7.80MB 复制文件或目录到容器中
ADD alpine-minirootfs-3.20.3-x86_64.tar.gz / # buildkit
镜像信息
{
"Id": "sha256:25513e3b5fdf86129639c88c196d55a4b4b108e3bc5a96a5918eb71d5675eec9",
"RepoTags": [
"nginxinc/nginx-unprivileged:1.26-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginxinc/nginx-unprivileged:1.26-alpine"
],
"RepoDigests": [
"nginxinc/nginx-unprivileged@sha256:fa1745a8a60dce3ae6ac4063580781cc697343bdc443c0a283086259da551517",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginxinc/nginx-unprivileged@sha256:17e0ae117db960d2cf342712eeb0087439942997fa1046430e5782d82980aba0"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-12-23T01:07:41.829165757Z",
"Container": "",
"ContainerConfig": null,
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "101",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NGINX_VERSION=1.26.2",
"PKG_RELEASE=1",
"DYNPKG_RELEASE=2",
"NJS_VERSION=0.8.5",
"NJS_RELEASE=1"
],
"Cmd": [
"nginx",
"-g",
"daemon off;"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": [
"/docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"maintainer": "NGINX Docker Maintainers \u003cdocker-maint@nginx.com\u003e",
"org.opencontainers.image.created": "2024-12-23T01:07:28.390Z",
"org.opencontainers.image.description": "Unprivileged NGINX Dockerfiles",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "899909ee1a9fd15d6ae19a1197d199b5ba2c2fea",
"org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx-unprivileged",
"org.opencontainers.image.title": "docker-nginx-unprivileged",
"org.opencontainers.image.url": "https://github.com/nginxinc/docker-nginx-unprivileged",
"org.opencontainers.image.version": "1.26.2-alpine"
},
"StopSignal": "SIGQUIT"
},
"Architecture": "amd64",
"Os": "linux",
"Size": 48781187,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/d332c12a142ee560a08f359d010e0e38fcbc82f19999de8fef58eec5bbe0d9cb/diff:/var/lib/docker/overlay2/732bbe00cc65490cec526254a9778ed8f19c471fc76f5fbde19db7e7aa72be61/diff:/var/lib/docker/overlay2/5e00fdfddc2e67bae81a204a7667d8a226d0b5029c02afced8c3f0166a35ba60/diff:/var/lib/docker/overlay2/38d03f11d05750ca1ca89b6a90fabcf2e46b20e4b8b2b260d1a4cff888ee397b/diff:/var/lib/docker/overlay2/e8885a88fefdf66110c01d156d20ea46705fabafee97d6c634d8072e09154d00/diff:/var/lib/docker/overlay2/d1a6ff1c530bb79873328e95876434d1d6b0e533e26f980d234df44d64d116aa/diff:/var/lib/docker/overlay2/6a481bbb2bf23f4bf6788a9a0ffeff2e5bd2610f2cc146f5ac3c9b6447bd3753/diff:/var/lib/docker/overlay2/23c5724f3a35122d45237c48d0eec74bfb90f129834f1ecb674937c0af9f9db3/diff",
"MergedDir": "/var/lib/docker/overlay2/ddd42171609f62e122216ac0e36045c45963773640c6938c8df14672d59ce442/merged",
"UpperDir": "/var/lib/docker/overlay2/ddd42171609f62e122216ac0e36045c45963773640c6938c8df14672d59ce442/diff",
"WorkDir": "/var/lib/docker/overlay2/ddd42171609f62e122216ac0e36045c45963773640c6938c8df14672d59ce442/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:75654b8eeebd3beae97271a102f57cdeb794cc91e442648544963a7e951e9558",
"sha256:be3dda1778da4f3f3a77ff2e6faaaacae2cebe1b758dd7f3c89bd4c29ec6c0ac",
"sha256:7f6ec88b428cbdea7914cedeebc1085db37cd9bbc1c43b37e9891f63d4b4ee42",
"sha256:c4a99e8844fc3e2af0b3b4b0ebb7528025ac17098a069d6c545b5e60675c9492",
"sha256:c9cb25f920818c46462dc5f78c260cd5ee13881549efe748011df94fb8dffa4a",
"sha256:9e770e0edeede088ba70648a4e8e4da64ba41a464d0c85a516f09313e083189f",
"sha256:32ea5d8a97fa8e91d8419e5e75713ae62627522023afd7ace278e0bbd6bee630",
"sha256:3e3741fe106629142985d95ef1748ed0f8e4e4865a1fda9299c3bd6f695ec269",
"sha256:d32433c42ea9219c0f1818ad0913181b03c651958213c1340144d55c3fc63d83"
]
},
"Metadata": {
"LastTagTime": "2024-12-25T01:01:48.570496054+08:00"
}
}