镜像构建历史
# 2024-12-05 21:19:52 0.00B 设置默认要执行的命令
CMD ["python3"]
# 2024-12-05 21:19:52 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-12-05 21:19:52 44.27MB 执行命令并创建新的镜像层
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 --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; 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 '{}' + ; 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 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==58.1.0' wheel ; pip3 --version # buildkit
# 2024-12-05 21:19:52 0.00B 设置环境变量 PYTHON_SHA256
ENV PYTHON_SHA256=3126f59592c9b0d798584755f2bf7b081fa1ca35ce7a6fea980108d752a05bb1
# 2024-12-05 21:19:52 0.00B 设置环境变量 PYTHON_VERSION
ENV PYTHON_VERSION=3.9.21
# 2024-12-05 21:19:52 0.00B 设置环境变量 GPG_KEY
ENV GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568
# 2024-12-05 21:19:52 1.12MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache ca-certificates tzdata ; # buildkit
# 2024-12-05 21:19:52 0.00B 设置环境变量 LANG
ENV LANG=C.UTF-8
# 2024-12-05 21:19:52 0.00B 设置环境变量 PATH
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# 2024-12-05 20:49:04 0.00B 设置默认要执行的命令
CMD ["/bin/sh"]
# 2024-12-05 20:49:04 8.18MB 复制文件或目录到容器中
ADD alpine-minirootfs-3.21.0-aarch64.tar.gz / # buildkit
镜像信息
{
"Id": "sha256:4dd286dc43cb86be9a8abb788bc442571e3b3231623ca4cb8fc5baf85c2d0f24",
"RepoTags": [
"python:3.9-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.9-alpine-linuxarm64"
],
"RepoDigests": [
"python@sha256:e6bdad4fed6deb8514fbeb735eb34ebb5c2d3ac72342f27b18df353ac0058d66",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python@sha256:f013016a1bc5d4545d92139e55862064e3423935a32cd2722413d87ae5fd34c2"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-12-05T13:19:52Z",
"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=E3FF2839C048B25C084DEBE9B26995E310250568",
"PYTHON_VERSION=3.9.21",
"PYTHON_SHA256=3126f59592c9b0d798584755f2bf7b081fa1ca35ce7a6fea980108d752a05bb1"
],
"Cmd": [
"python3"
],
"Image": "",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "arm64",
"Variant": "v8",
"Os": "linux",
"Size": 53570737,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/cda22c6be673aa9648f644fb9aa39ca2bf1c005abc9ae2bbd9c1b37e27ad4aa6/diff:/var/lib/docker/overlay2/fd6aaa99961a7eb6884c4f18cfda428acbc3e7d2a97c173b61bd4a0a864ea71c/diff:/var/lib/docker/overlay2/9ecd1cc64761b4843849d653424f6e2a686c944576526dfb90bb4b83494d505d/diff",
"MergedDir": "/var/lib/docker/overlay2/04013413d4c7968a0ff7096ec2e9503b9484232c36bf481c5d9902722e26a402/merged",
"UpperDir": "/var/lib/docker/overlay2/04013413d4c7968a0ff7096ec2e9503b9484232c36bf481c5d9902722e26a402/diff",
"WorkDir": "/var/lib/docker/overlay2/04013413d4c7968a0ff7096ec2e9503b9484232c36bf481c5d9902722e26a402/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:977340364f395522c48194db0cf2a81b7643d1bd1378a4c16dc848095a39de7d",
"sha256:32979043e1e80964e86e2400733b0e6c3fba78c8ed8080110c17b1cdadb5f7e4",
"sha256:57c133325b9ed0710e4ee4e9a1880658b10fd04a90ce51bdf98b3fe5fe9c2f87",
"sha256:6099285ab77dee8f82e0083f46a1158e1e2a3a3b05cb8d11108b929d353b081a"
]
},
"Metadata": {
"LastTagTime": "2025-01-07T20:57:13.844390277+08:00"
}
}