镜像构建历史
# 2025-08-15 05:49:23 0.00B 设置默认要执行的命令
CMD ["python3"]
# 2025-08-15 05:49:23 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
# 2025-08-15 05:49:23 38.58MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache --virtual .build-deps gnupg tar xz bluez-dev bzip2-dev dpkg-dev dpkg findutils gcc gdbm-dev libc-dev libffi-dev libnsl-dev libtirpc-dev linux-headers make ncurses-dev openssl-dev pax-utils readline-dev sqlite-dev tcl-dev tk tk-dev util-linux-dev xz-dev zlib-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-option-checking=fatal --enable-shared $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; LDFLAGS="${LDFLAGS:--Wl},--strip-all"; arch="$(apk --print-arch)"; case "$arch" in x86_64|aarch64) EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; ;; x86) ;; *) EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; ;; esac; 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 '{}' + ; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' | xargs -rt apk add --no-network --virtual .python-rundeps ; apk del --no-network .build-deps; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 --version # buildkit
# 2025-08-15 05:49:23 0.00B 设置环境变量 PYTHON_SHA256
ENV PYTHON_SHA256=5462f9099dfd30e238def83c71d91897d8caa5ff6ebc7a50f14d4802cdaaa79a
# 2025-08-15 05:49:23 0.00B 设置环境变量 PYTHON_VERSION
ENV PYTHON_VERSION=3.13.7
# 2025-08-15 05:49:23 0.00B 设置环境变量 GPG_KEY
ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305
# 2025-08-15 05:49:23 1.09MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache ca-certificates tzdata ; # buildkit
# 2025-08-15 05:49:23 0.00B 设置环境变量 PATH
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# 2025-07-15 19:01:16 0.00B 设置默认要执行的命令
CMD ["/bin/sh"]
# 2025-07-15 19:01:16 8.51MB 复制文件或目录到容器中
ADD alpine-minirootfs-3.22.1-aarch64.tar.gz / # buildkit
镜像信息
{
"Id": "sha256:b2236d9e1563c507613962c1ebbd7b3d307969ec2ee355b781b68440f4f0bee3",
"RepoTags": [
"python:3.13-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/python:3.13-alpine-linuxarm64"
],
"RepoDigests": [
"python@sha256:9ba6d8cbebf0fb6546ae71f2a1c14f6ffd2fdab83af7fa5669734ef30ad48844",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/python@sha256:2d64162dc90f2f8ed84b300963e3cafa10e56773a648cec877eb2966d5339daf"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2025-08-14T21:49:23Z",
"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.7",
"PYTHON_SHA256=5462f9099dfd30e238def83c71d91897d8caa5ff6ebc7a50f14d4802cdaaa79a"
],
"Cmd": [
"python3"
],
"Image": "",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "arm64",
"Variant": "v8",
"Os": "linux",
"Size": 48182740,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/0eef2e5467971a8cc5409c6b6811532cfaa87ca3ce31b557f31bae51d5b3175e/diff:/var/lib/docker/overlay2/353f22fa95e6a23593202367379354c01b470bbbaa053a709bd489eec75dfb87/diff:/var/lib/docker/overlay2/f5e718d8a0e870ff4cf6480f22588d909d8993919d5d119bfbea43bb872e48fe/diff",
"MergedDir": "/var/lib/docker/overlay2/5c65645330a5aceb395dd0a98b40f651750e40373e19d32eb0342c5a6c3b5ab0/merged",
"UpperDir": "/var/lib/docker/overlay2/5c65645330a5aceb395dd0a98b40f651750e40373e19d32eb0342c5a6c3b5ab0/diff",
"WorkDir": "/var/lib/docker/overlay2/5c65645330a5aceb395dd0a98b40f651750e40373e19d32eb0342c5a6c3b5ab0/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:0b83d017db6efafadf6b3f18d087d2ce1d67d8f0e927dc7254b0ad088074cd3a",
"sha256:614461d789e2b43487ab933d81d5cbbbd7fb00e441fe17f04cbf3f419f4b6502",
"sha256:c1f7bdc2b585ce88a7a854ee27a495f368f1a2a7f9b9bb48ff5f7376a58a1c2a",
"sha256:13073916cb4fef932de2b84f2d27df3a8d9b58136a02d1f8d5d5e518a0a8aa61"
]
},
"Metadata": {
"LastTagTime": "2025-08-29T20:26:08.606904263+08:00"
}
}