镜像构建历史
# 2024-12-20 02:32:34 0.00B 设置默认要执行的命令
CMD ["php" "-a"]
# 2024-12-20 02:32:34 0.00B 配置容器启动时运行的命令
ENTRYPOINT ["docker-php-entrypoint"]
# 2024-12-20 02:32:34 17.00B 执行命令并创建新的镜像层
RUN /bin/sh -c docker-php-ext-enable sodium # buildkit
# 2024-12-20 02:32:34 7.20KB 复制新文件或目录到容器中
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/ # buildkit
# 2024-12-20 02:32:34 131.84MB 执行命令并创建新的镜像层
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 --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 02:32:34 587.00B 复制新文件或目录到容器中
COPY docker-php-source /usr/local/bin/ # buildkit
# 2024-12-20 02:32:34 12.94MB 执行命令并创建新的镜像层
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 02:32:34 0.00B 设置环境变量 PHP_SHA256
ENV PHP_SHA256=3df5d45637283f759eef8fc3ce03de829ded3e200c3da278936a684955d2f94f
# 2024-12-20 02:32:34 0.00B 设置环境变量 PHP_URL PHP_ASC_URL
ENV PHP_URL=https://www.php.net/distributions/php-8.3.15.tar.xz PHP_ASC_URL=https://www.php.net/distributions/php-8.3.15.tar.xz.asc
# 2024-12-20 02:32:34 0.00B 设置环境变量 PHP_VERSION
ENV PHP_VERSION=8.3.15
# 2024-12-20 02:32:34 0.00B 设置环境变量 GPG_KEYS
ENV GPG_KEYS=1198C0117593497A5EC5C199286AF1F9897469DC C28D937575603EB4ABB725861C0779DC5C0A9DE4 AFD8691FDAEDF03BDF6E460563F15A9B715376CA
# 2024-12-20 02:32:34 0.00B 设置环境变量 PHP_LDFLAGS
ENV PHP_LDFLAGS=-Wl,-O1 -pie
# 2024-12-20 02:32:34 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 02:32:34 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 02:32:34 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 02:32:34 0.00B 设置环境变量 PHP_INI_DIR
ENV PHP_INI_DIR=/usr/local/etc/php
# 2024-12-20 02:32:34 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 02:32:34 0.00B 设置环境变量 PHPIZE_DEPS
ENV PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
# 2024-12-20 02:32:34 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 02:32:34 74.82MB
# debian.sh --arch 'amd64' out/ 'bookworm' '@1734912000'
镜像信息
{
"Id": "sha256:d5f474414a24dd1a883986489e7e6cddd88dfad040ab5c1be57d6f61de7c26de",
"RepoTags": [
"php:8.3.15-cli",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/php:8.3.15-cli"
],
"RepoDigests": [
"php@sha256:4b5533da7a0396ca147c1b323ce78ef564a9c89c830c394ea25050da51ab83fe",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/php@sha256:c118d1deecbf7aa89afc42fa79477bfb372a42383fff5462155954d9eaf32020"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-12-19T18:32:34Z",
"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=1198C0117593497A5EC5C199286AF1F9897469DC C28D937575603EB4ABB725861C0779DC5C0A9DE4 AFD8691FDAEDF03BDF6E460563F15A9B715376CA",
"PHP_VERSION=8.3.15",
"PHP_URL=https://www.php.net/distributions/php-8.3.15.tar.xz",
"PHP_ASC_URL=https://www.php.net/distributions/php-8.3.15.tar.xz.asc",
"PHP_SHA256=3df5d45637283f759eef8fc3ce03de829ded3e200c3da278936a684955d2f94f"
],
"Cmd": [
"php",
"-a"
],
"Image": "",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": [
"docker-php-entrypoint"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 534497264,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/012583f4fbfd3fc0d784fbf4064fb565991258b1d09dc9710dbb20b3e32a78ea/diff:/var/lib/docker/overlay2/800ababf9c221657ec9b6c092a22cece44814d9460febaba66765eb34d0d0cde/diff:/var/lib/docker/overlay2/3b9b592459fdb5d06abbe342c766c326f3e12ad402ab90cca26bbaa1a9eab125/diff:/var/lib/docker/overlay2/74161f9114e65a59b81934e372c33dd3e21e55f9d134148ac6dc5a12c74d6ccf/diff:/var/lib/docker/overlay2/343593be6cf844bf7e5421ba20a7b930ff6910252a8930f0196d3374651285a7/diff:/var/lib/docker/overlay2/391246917e00b026e01faab46ba3fb7475cad9898492df86df4503d1ad177c48/diff:/var/lib/docker/overlay2/feb8c4f105767e02c2b8dd4048dab4fa8e91e39afacedfbc24878fcc23910387/diff:/var/lib/docker/overlay2/d7da656d9414ae961b292fa109d069e923b341eab550c2db09cb0ab256f4ae70/diff",
"MergedDir": "/var/lib/docker/overlay2/af9576097c7addf6a3e23e59424acfcfc0c7745b5664d7e8fda2706768160ea2/merged",
"UpperDir": "/var/lib/docker/overlay2/af9576097c7addf6a3e23e59424acfcfc0c7745b5664d7e8fda2706768160ea2/diff",
"WorkDir": "/var/lib/docker/overlay2/af9576097c7addf6a3e23e59424acfcfc0c7745b5664d7e8fda2706768160ea2/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:8b296f48696071aafb5a6286ca60d441a7e559b192fc7f94bb63ee93dae98f17",
"sha256:4cbe8a050c9b1f331716c664ee7a0399ae4fbafe8a75eee907e65b21ef30c272",
"sha256:4537c1854607bab38da1c222fb66725c17798f4f517fec5c8d1b4651c76c20d8",
"sha256:fd2607729d3820debebd2802cf8b810e7156748a02280d92586e90ec0623a1b5",
"sha256:e834ac759a4cbd54f6b67aff6e48eb58598a98cafb4e71acb59f04739f919bce",
"sha256:c67d3c1f3c23ebeb92343c95970519e47f573ae41681cdca8872cf1e6cba3e44",
"sha256:6ee511d7976789f7fc891036461044028ab2a241e88f4a274dd67d57afc428e6",
"sha256:5dd1d1de02855bdda79cb482823f97e254712aa27ea20b561295cb43802001d8",
"sha256:c9e1850a64abb57741f9824ab384eb6bfc175ffb9604ec0999fe0e1a6293f666"
]
},
"Metadata": {
"LastTagTime": "2025-01-06T10:11:34.419991793+08:00"
}
}