镜像构建历史
# 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 41.49MB 执行命令并创建新的镜像层
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-lto --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 --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 999.45KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache ca-certificates tzdata ; # 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-09-06 20:05:36 0.00B 设置默认要执行的命令
CMD ["/bin/sh"]
# 2024-09-06 20:05:36 7.80MB 复制文件或目录到容器中
ADD alpine-minirootfs-3.20.3-x86_64.tar.gz / # buildkit
镜像信息
{
"Id": "sha256:ecace5a7a34911532c3318a27a73f0c5c4d689e9e8f7284b89aab28352d6971d",
"RepoTags": [
"python:3-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/python:3-alpine"
],
"RepoDigests": [
"python@sha256:fcbcbbecdeae71d3b77445d9144d1914df55110f825ab62b04a66c7c33c09373",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/python@sha256:d3e1b23e99b1ff6893732d525edb01305a89b2a0f57c79d566ef90e5ce88b3fb"
],
"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": 50289010,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/9c997d9e0d187bd7b598462d7f61eecd6a94e8eb2d28559bc6a83b60d4520323/diff:/var/lib/docker/overlay2/0f8c2cd4a483731501add531c54aaa120ec78c51d68a5463ec3a23c4b7c33719/diff:/var/lib/docker/overlay2/23c5724f3a35122d45237c48d0eec74bfb90f129834f1ecb674937c0af9f9db3/diff",
"MergedDir": "/var/lib/docker/overlay2/be1cb44a478869fa21e54320ec1885e20314ba4842867e02335883b3edd9a707/merged",
"UpperDir": "/var/lib/docker/overlay2/be1cb44a478869fa21e54320ec1885e20314ba4842867e02335883b3edd9a707/diff",
"WorkDir": "/var/lib/docker/overlay2/be1cb44a478869fa21e54320ec1885e20314ba4842867e02335883b3edd9a707/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:75654b8eeebd3beae97271a102f57cdeb794cc91e442648544963a7e951e9558",
"sha256:45fae1a307dcc18d788a02c769772d94a4b3071ea53aa8120b0d93e1e0e213cf",
"sha256:b2c8e72d9b6cff632851529f8869ad0431f96eca52e6a4a6272677b8f63f61f6",
"sha256:51d8f5d0da052a4efb10f6847b7eacc30307658a8685d4a8fc9bfe286226afed"
]
},
"Metadata": {
"LastTagTime": "2024-11-20T16:15:55.609305526+08:00"
}
}