镜像构建历史
# 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.16MB 执行命令并创建新的镜像层
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=aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79
# 2024-10-19 07:23:40 0.00B 设置环境变量 PYTHON_VERSION
ENV PYTHON_VERSION=3.10.15
# 2024-10-19 07:23:40 0.00B 设置环境变量 GPG_KEY
ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D
# 2024-10-19 07:23:40 9.24MB 执行命令并创建新的镜像层
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-17 08:20:30 0.00B
/bin/sh -c #(nop) CMD ["bash"]
# 2024-10-17 08:20:29 74.78MB
/bin/sh -c #(nop) ADD file:90b9dd8f12120e8b2cd3ece45fcbe8af67e40565e2032a40f64bd921c43e2ce7 in /
镜像信息
{
"Id": "sha256:3e625a83fe8d3ea2a08e8752ea253145030a2ed42baf00582dbe129e7f79d392",
"RepoTags": [
"python:3.10-slim-bookworm",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.10-slim-bookworm"
],
"RepoDigests": [
"python@sha256:eb9ca77b1a0ffbde84c1dc333beb3490a2638813cc25a339f8575668855b9ff1",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python@sha256:ac10aae5e8c96d1461d54220c4c794eed2f6ca374a00c7e1f84c0a7f6ecddd4d"
],
"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.10.15",
"PYTHON_SHA256=aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79"
],
"Cmd": [
"python3"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 127174566,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/15d7be91d278b83ab5d563fdfcfc70b4f90a442670beff08039660d59eb12f2c/diff:/var/lib/docker/overlay2/21bdb458499b03e11f6083fa39eee721f92d1a0a9acc45e8a19c1fbd60ffbc4e/diff:/var/lib/docker/overlay2/640dc40711366eefdc38587353d7800897ec5b45fb0486472d1bbe1802e322be/diff",
"MergedDir": "/var/lib/docker/overlay2/d35aea5182d43ec0b442277869e6b48661deccb9237c5f81bdb6de77e7f532fb/merged",
"UpperDir": "/var/lib/docker/overlay2/d35aea5182d43ec0b442277869e6b48661deccb9237c5f81bdb6de77e7f532fb/diff",
"WorkDir": "/var/lib/docker/overlay2/d35aea5182d43ec0b442277869e6b48661deccb9237c5f81bdb6de77e7f532fb/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:98b5f35ea9d3eca6ed1881b5fe5d1e02024e1450822879e4c13bb48c9386d0ad",
"sha256:eb70195b3e7f8daebabac38dd87b5f619042bb98deee8900015ca88bf1e8bf74",
"sha256:796a04bf70eb72fc9cf36180aa30768848a0d4b0f663949ef4458236f758f210",
"sha256:aa223cd851d4b80454b7daea383807fe2eccc6d43ae14c171d102b2a6e3c92b3"
]
},
"Metadata": {
"LastTagTime": "2024-10-23T13:49:57.680649865+08:00"
}
}