镜像构建历史
# 2024-12-20 00:49:54 0.00B 设置默认要执行的命令
CMD ["php" "-a"]
# 2024-12-20 00:49:54 0.00B 配置容器启动时运行的命令
ENTRYPOINT ["docker-php-entrypoint"]
# 2024-12-20 00:49:54 17.00B 执行命令并创建新的镜像层
RUN /bin/sh -c docker-php-ext-enable sodium # buildkit
# 2024-12-20 00:49:54 7.20KB 复制新文件或目录到容器中
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ # buildkit
# 2024-12-20 00:49:54 124.36MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends libargon2-dev libcurl4-openssl-dev libonig-dev libreadline-dev libsodium-dev libsqlite3-dev libssl-dev libxml2-dev zlib1g-dev ; export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" PHP_BUILD_PROVIDER='https://github.com/docker-library/php' PHP_UNAME='Linux - Docker' ; docker-php-source extract; cd /usr/src/php; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; if [ ! -d /usr/include/curl ]; then ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; fi; ./configure --build="$gnuArch" --with-config-file-path="$PHP_INI_DIR" --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" --enable-option-checking=fatal --with-mhash --with-pic --enable-mbstring --enable-mysqlnd --with-password-argon2 --with-sodium=shared --with-pdo-sqlite=/usr --with-sqlite3=/usr --with-curl --with-iconv --with-openssl --with-readline --with-zlib --enable-phpdbg --enable-phpdbg-readline --with-pear $(test "$gnuArch" = 'riscv64-linux-gnu' && echo '--without-pcre-jit') --with-libdir="lib/$debMultiarch" --enable-embed ; make -j "$(nproc)"; find -type f -name '*.a' -delete; make install; find /usr/local -type f -perm '/0111' -exec sh -euxc ' strip --strip-all "$@" || : ' -- '{}' + ; make clean; cp -v php.ini-* "$PHP_INI_DIR/"; cd /; docker-php-source delete; apt-mark auto '.*' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; find /usr/local -type f -executable -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/*; pecl update-channels; rm -rf /tmp/pear ~/.pearrc; php --version # buildkit
# 2024-12-20 00:49:54 587.00B 复制新文件或目录到容器中
COPY docker-php-source /usr/local/bin/ # buildkit
# 2024-12-20 00:49:54 12.57MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends gnupg; rm -rf /var/lib/apt/lists/*; mkdir -p /usr/src; cd /usr/src; curl -fsSL -o php.tar.xz "$PHP_URL"; if [ -n "$PHP_SHA256" ]; then echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; fi; if [ -n "$PHP_ASC_URL" ]; then curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; export GNUPGHOME="$(mktemp -d)"; for key in $GPG_KEYS; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; done; gpg --batch --verify php.tar.xz.asc php.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME"; fi; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark > /dev/null; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false # buildkit
# 2024-12-20 00:49:54 0.00B 设置环境变量 PHP_SHA256
ENV PHP_SHA256=3eec91294d8c09b3df80b39ec36d574ed9b05de4c8afcb25fa215d48f9ecbc6b
# 2024-12-20 00:49:54 0.00B 设置环境变量 PHP_URL PHP_ASC_URL
ENV PHP_URL=https://www.php.net/distributions/php-8.2.27.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-8.2.27.tar.xz.asc
# 2024-12-20 00:49:54 0.00B 设置环境变量 PHP_VERSION
ENV PHP_VERSION=8.2.27
# 2024-12-20 00:49:54 0.00B 设置环境变量 GPG_KEYS
ENV GPG_KEYS=39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A 1198C0117593497A5EC5C199286AF1F9897469DC
# 2024-12-20 00:49:54 0.00B 设置环境变量 PHP_LDFLAGS
ENV PHP_LDFLAGS=-Wl,-O1 -pie
# 2024-12-20 00:49:54 0.00B 设置环境变量 PHP_CPPFLAGS -D_FILE_OFFSET_BITS
ENV PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
# 2024-12-20 00:49:54 0.00B 设置环境变量 PHP_CFLAGS -D_FILE_OFFSET_BITS
ENV PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
# 2024-12-20 00:49:54 0.00B 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; mkdir -p "$PHP_INI_DIR/conf.d"; [ ! -d /var/www/html ]; mkdir -p /var/www/html; chown www-data:www-data /var/www/html; chmod 1777 /var/www/html # buildkit
# 2024-12-20 00:49:54 0.00B 设置环境变量 PHP_INI_DIR
ENV PHP_INI_DIR=/usr/local/etc/php
# 2024-12-20 00:49:54 314.89MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends $PHPIZE_DEPS ca-certificates curl xz-utils ; rm -rf /var/lib/apt/lists/* # buildkit
# 2024-12-20 00:49:54 0.00B 设置环境变量 PHPIZE_DEPS
ENV PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
# 2024-12-20 00:49:54 46.00B 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; { echo 'Package: php*'; echo 'Pin: release *'; echo 'Pin-Priority: -1'; } > /etc/apt/preferences.d/no-debian-php # buildkit
# 2024-12-20 00:49:54 74.82MB
# debian.sh --arch 'amd64' out/ 'bookworm' '@1734912000'
镜像信息
{
"Id": "sha256:cebea59260e6182313362d277b59efce2b00822565a1bc97b23178a5b22ed2ca",
"RepoTags": [
"php:8.2-cli",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/php:8.2-cli"
],
"RepoDigests": [
"php@sha256:2b3b356c7f9f0fde404257a602de1953674f6cf3118436f7a2dbbf53f3ca8b75",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/php@sha256:5735391e611e7e9dd0cb6bea79ba7035bd9dc4d1087dd2a719775cab95331664"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-12-19T16:49:54Z",
"Container": "",
"ContainerConfig": null,
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
"PHP_INI_DIR=/usr/local/etc/php",
"PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
"PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
"PHP_LDFLAGS=-Wl,-O1 -pie",
"GPG_KEYS=39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A 1198C0117593497A5EC5C199286AF1F9897469DC",
"PHP_VERSION=8.2.27",
"PHP_URL=https://www.php.net/distributions/php-8.2.27.tar.xz",
"PHP_ASC_URL=https://www.php.net/distributions/php-8.2.27.tar.xz.asc",
"PHP_SHA256=3eec91294d8c09b3df80b39ec36d574ed9b05de4c8afcb25fa215d48f9ecbc6b"
],
"Cmd": [
"php",
"-a"
],
"Image": "",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": [
"docker-php-entrypoint"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 526647934,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/47cb3975943e147a268ee2f88791d875b85e5bba713625db59051f59a73dcac1/diff:/var/lib/docker/overlay2/ad00153f369201e3a155d3bfb658dc3a09cbe15d9894ba5632b6c0a10dfe1fed/diff:/var/lib/docker/overlay2/51901fbf8ba9e89c952409b3291c12ce128ebcc3bf96afc655b204fb1a8e9914/diff:/var/lib/docker/overlay2/5e1dc7319e9449e2ac5dab69cc47d7e39b341594d4db2ec46f16f0b538d9c837/diff:/var/lib/docker/overlay2/584ac4cd4a3f75b182ec25ee40b9947c68e577c0b000675233a0194e2c14fb5c/diff:/var/lib/docker/overlay2/9be315052ca13e17cd72a8203cb8d4a4ddd9c290c5b3e20b702dad876e9a0408/diff:/var/lib/docker/overlay2/966a95b222629c1e3330b53d6e7ab0dc8918a67c458c2edf5a2f7e9008f22ccd/diff:/var/lib/docker/overlay2/d7da656d9414ae961b292fa109d069e923b341eab550c2db09cb0ab256f4ae70/diff",
"MergedDir": "/var/lib/docker/overlay2/5bc315bcf6859012c35f79b437ba9f36453cebdb6377616cfbc4715813787373/merged",
"UpperDir": "/var/lib/docker/overlay2/5bc315bcf6859012c35f79b437ba9f36453cebdb6377616cfbc4715813787373/diff",
"WorkDir": "/var/lib/docker/overlay2/5bc315bcf6859012c35f79b437ba9f36453cebdb6377616cfbc4715813787373/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:8b296f48696071aafb5a6286ca60d441a7e559b192fc7f94bb63ee93dae98f17",
"sha256:8b74f6230f2103f3c969753b8ae8d9c00944e30daf8002d9266f4135b6b6514b",
"sha256:758df2d6f03ddb4c8eccf3ee96645033f37616057928f20eb0b476625ab8ea6f",
"sha256:86140eb3e830dcb7376cea72351137415623a55bcecb63ca012c528c455c4d35",
"sha256:96c14409540c422339a6e969a630ea151f3b1ba0668bbe160d30c55dd8d0b148",
"sha256:1af696efe0f585ab7ed6302df83666b0a5c8142d9376be536bf30058bc2acad4",
"sha256:ad282684f464351571a7002b8a42d5a6760203ba5b426e873c58bb5efa780f0f",
"sha256:e903e7e4e10d4990031d04976c14744f45014ce82de7534fde2ddbb9231ea8c5",
"sha256:61f71823451f1e7ac9cb001e89253099a2687ef55c4593384b1c9d0f7c46ad30"
]
},
"Metadata": {
"LastTagTime": "2025-01-06T10:09:47.708311792+08:00"
}
}