镜像构建历史
# 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 36.77MB 执行命令并创建新的镜像层
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 --version # buildkit
# 2024-10-19 07:23:40 0.00B 设置环境变量 PYTHON_SHA256
ENV PYTHON_SHA256=086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d
# 2024-10-19 07:23:40 0.00B 设置环境变量 PYTHON_VERSION
ENV PYTHON_VERSION=3.13.0
# 2024-10-19 07:23:40 0.00B 设置环境变量 GPG_KEY
ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305
# 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 设置环境变量 PATH
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# 2024-10-19 07:23:40 0.00B 设置默认要执行的命令
CMD ["bash"]
# 2024-10-19 07:23:40 74.78MB 复制文件或目录到容器中
ADD rootfs.tar.xz / # buildkit
镜像信息
{
"Id": "sha256:66ba4da5ff2114093a34ea61ee5c4cf7e2f707366bf189eb57add955c48fae1d",
"RepoTags": [
"python:3.13-slim",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.13-slim"
],
"RepoDigests": [
"python@sha256:4efa69bf17cfbd83a9942e60e2642335c3b397448e00410063a0421f9727c4c4",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python@sha256:1c0dff547cc7ac0c0fc9d04d11b06ea347d7daab772dec77785bf453955e4110"
],
"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",
"GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305",
"PYTHON_VERSION=3.13.0",
"PYTHON_SHA256=086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d"
],
"Cmd": [
"python3"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 120781584,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/c54ae7fd07918ad2a67f473d491ba01687823fe4d9e70d1c4a2b9bba07dedb97/diff:/var/lib/docker/overlay2/985851db100f1b4885df7b62e9c2c7a9b37352c405111f680ebb0f03e68f7cd2/diff:/var/lib/docker/overlay2/91eaeb3375babd906dc7e8a6c516620560ab7dbfb21b9881f9ae71d2e2f398b0/diff",
"MergedDir": "/var/lib/docker/overlay2/51bb3d7c450f9feebbbaf5c1a076ab875bf357fdf0c5a62e71e5a352577a37c0/merged",
"UpperDir": "/var/lib/docker/overlay2/51bb3d7c450f9feebbbaf5c1a076ab875bf357fdf0c5a62e71e5a352577a37c0/diff",
"WorkDir": "/var/lib/docker/overlay2/51bb3d7c450f9feebbbaf5c1a076ab875bf357fdf0c5a62e71e5a352577a37c0/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:c3548211b8264f8bfa47a6727043a64f1791b82ac965a284a7ea187e971a95e2",
"sha256:2f130876ec2ff3f92dcf2d3d40848dcf1424aded2dc577b57a927ec54f8eb615",
"sha256:1ed447603d2036003069550d6675135ab2142de492255ce5d50ab23215be8d0f",
"sha256:40ac043c693960632ef4db9082a3e59342426dfc43b26add350d5abac67f249e"
]
},
"Metadata": {
"LastTagTime": "2024-11-14T18:04:34.568760668+08:00"
}
}