镜像构建历史
# 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 43.53MB 执行命令并创建新的镜像层
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 2.33MB 执行命令并创建新的镜像层
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 80.66MB
# debian.sh --arch 'amd64' out/ 'bullseye' '@1733097600'
镜像信息
{
"Id": "sha256:c392dcfc9b80434d4ad0ddbd6e4e98ec8c35bcb4d8d9d688e5d2098383eea47a",
"RepoTags": [
"python:3.11.10-slim-bullseye",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.11.10-slim-bullseye"
],
"RepoDigests": [
"python@sha256:ed5f7120b2a4fe3296b2293128cef5f08077f489efc6c473015e10fe4228875a",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python@sha256:39fba59fec449cafab076edaa51092e572f04e46b64996fe93ea65246baf5d90"
],
"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": 126514033,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/52f6d187134459edd585bcd6800e7eb096f81c2006e4ebc34eb139c3ec749c82/diff:/var/lib/docker/overlay2/1ebc09c98582510b20c933242966959897c59b0cb3ca021dfb90e8fbedc8950f/diff:/var/lib/docker/overlay2/12d0644a23b709834a500bc47853c1c0041c2dc276e44395ba0a8a325d447489/diff",
"MergedDir": "/var/lib/docker/overlay2/f34d39fc570d1258aec37c536344d7a42c00b13606e5b425a2e685e8e542d44b/merged",
"UpperDir": "/var/lib/docker/overlay2/f34d39fc570d1258aec37c536344d7a42c00b13606e5b425a2e685e8e542d44b/diff",
"WorkDir": "/var/lib/docker/overlay2/f34d39fc570d1258aec37c536344d7a42c00b13606e5b425a2e685e8e542d44b/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:6a4fdc7ff1bfb236bd5caadebad42a7a36cbab09ee1eff157659d5adb47f6500",
"sha256:bad01c8f38815626029a68e1f59af36027bd250c27e3994a0bbd0f325a05597e",
"sha256:2976ba69f70e78a79a1ea63fb2bf3a77b5b7c8f6e2c9e26944050dc0e191e455",
"sha256:c3137f9e889ea568952be6b38e8e5bca3a70b2aab925729ee86e19ca638ec705"
]
},
"Metadata": {
"LastTagTime": "2024-12-11T14:13:42.785180319+08:00"
}
}