镜像构建历史
# 2024-10-19 07:23:40 0.00B 设置默认要执行的命令
CMD ["python3"]
# 2024-10-19 07:23:40 36.00B 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; for src in idle3 pip3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/$src" ]; [ ! -e "/usr/local/bin/$dst" ]; ln -svT "$src" "/usr/local/bin/$dst"; done # buildkit
# 2024-10-19 07:23:40 45.80MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-dev gcc gnupg libbluetooth-dev libbz2-dev libc6-dev libdb-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev make tk-dev uuid-dev wget xz-utils zlib1g-dev ; wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; gpg --batch --verify python.tar.xz.asc python.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME" python.tar.xz.asc; mkdir -p /usr/src/python; tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; rm python.tar.xz; cd /usr/src/python; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-optimizations --enable-option-checking=fatal --enable-shared --with-lto --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; LDFLAGS="${LDFLAGS:--Wl},--strip-all"; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-}" ; rm python; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" python ; make install; cd /; rm -rf /usr/src/python; find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \) -exec rm -rf '{}' + ; ldconfig; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -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/*; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==65.5.1' wheel ; pip3 --version # buildkit
# 2024-10-19 07:23:40 0.00B 设置环境变量 PYTHON_SHA256
ENV PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372
# 2024-10-19 07:23:40 0.00B 设置环境变量 PYTHON_VERSION
ENV PYTHON_VERSION=3.11.10
# 2024-10-19 07:23:40 0.00B 设置环境变量 GPG_KEY
ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D
# 2024-10-19 07:23:40 8.48MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates netbase tzdata ; rm -rf /var/lib/apt/lists/* # buildkit
# 2024-10-19 07:23:40 0.00B 设置环境变量 LANG
ENV LANG=C.UTF-8
# 2024-10-19 07:23:40 0.00B 设置环境变量 PATH
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# 2024-10-19 07:23:40 74.82MB
# debian.sh --arch 'amd64' out/ 'bookworm' '@1733097600'
镜像信息
{
"Id": "sha256:80abb94774d660831663290fe0b208b3e067b88647902f0f9e1d3a331a997afd",
"RepoTags": [
"python:3.11.10-slim-bookworm",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.11.10-slim-bookworm"
],
"RepoDigests": [
"python@sha256:840e180ebcc6e5c8efab209c43f5e40fd2af98cb49db5c7103c90539c56bb30e",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python@sha256:45e464ea7b37a6a705db8396c80ed885de75caa4729ad5de73afed55eb91aa35"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-10-18T23:23:40Z",
"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/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D",
"PYTHON_VERSION=3.11.10",
"PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372"
],
"Cmd": [
"python3"
],
"Image": "",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 129094486,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/17e302dfd547cca27f8de86e9578a996cd1992103c0c427688393fb65b02b0fb/diff:/var/lib/docker/overlay2/71575b535c3a22a05ff399f3815fa091b5d01d65773e58eeecc3e8365a330f20/diff:/var/lib/docker/overlay2/404e59c4c9adc52232d40ea19adf6c8d76b2fc9392dc54e49d9840bbd9ffc580/diff",
"MergedDir": "/var/lib/docker/overlay2/11b1b0cf545e0c2c3139ac55fb21a3c8329bd2fe7f4c16911f7a5b8aeeb61256/merged",
"UpperDir": "/var/lib/docker/overlay2/11b1b0cf545e0c2c3139ac55fb21a3c8329bd2fe7f4c16911f7a5b8aeeb61256/diff",
"WorkDir": "/var/lib/docker/overlay2/11b1b0cf545e0c2c3139ac55fb21a3c8329bd2fe7f4c16911f7a5b8aeeb61256/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:c0f1022b22a9b36851b358f44e5475e39d166e71a8073cf53c894a299239b1c5",
"sha256:bc9155b10ccec596b3283ceca7cc847bc4046db14eab7f77b9b170b5e825e0a5",
"sha256:0266a6d27cd42ef4422dfb0b6dbd4186f3524600502559e13947f8d4de65c931",
"sha256:cfc6e3b5400ce78d3df9c4826f39a78db0e7e9a01d2581b860b5611ac6829af6"
]
},
"Metadata": {
"LastTagTime": "2024-12-11T16:04:39.262516324+08:00"
}
}