镜像构建历史
# 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 42.22MB 执行命令并创建新的镜像层
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 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==65.5.1' wheel ; pip3 --version # buildkit
# 2024-12-05 21:19:52 0.00B 设置环境变量 PYTHON_SHA256
ENV PYTHON_SHA256=bfb249609990220491a1b92850a07135ed0831e41738cf681d63cf01b2a8fbd1
# 2024-12-05 21:19:52 0.00B 设置环境变量 PYTHON_VERSION
ENV PYTHON_VERSION=3.10.16
# 2024-12-05 21:19:52 0.00B 设置环境变量 GPG_KEY
ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D
# 2024-12-05 21:19:52 1.01MB 执行命令并创建新的镜像层
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 7.84MB 复制文件或目录到容器中
ADD alpine-minirootfs-3.21.0-x86_64.tar.gz / # buildkit
镜像信息
{
"Id": "sha256:23c56fcfd2a349b02737e3b57b76d309440b34a2cae013699311aa52cb9bafb4",
"RepoTags": [
"python:3.10-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.10-alpine"
],
"RepoDigests": [
"python@sha256:748b5868188a58e05375eb70972cbdb338bae30c6e613a847910315e3d20afc4",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python@sha256:6194518edd4e4a24e88d20d36c79509d6761c18e32ee6287be4b18a256ba57df"
],
"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=A035C8C19219BA821ECEA86B64E628F8D684696D",
"PYTHON_VERSION=3.10.16",
"PYTHON_SHA256=bfb249609990220491a1b92850a07135ed0831e41738cf681d63cf01b2a8fbd1"
],
"Cmd": [
"python3"
],
"Image": "",
"Volumes": null,
"WorkingDir": "/",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 51066343,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/3317d583e2feaff4d4fbdba4410a50b2a202a5e9fc4edb08153d467544ebdfa0/diff:/var/lib/docker/overlay2/4ba2f8fb9d866a162b87b5d104017193bf233b3923a4186ba51efe9724148203/diff:/var/lib/docker/overlay2/f07ea7cb47adf971ea839c1595bfec4091f695e5c89b7266542a721564307497/diff",
"MergedDir": "/var/lib/docker/overlay2/5d62fe71e2817166efae53507910f141ef2a057ecb01616b03ef183bebca0015/merged",
"UpperDir": "/var/lib/docker/overlay2/5d62fe71e2817166efae53507910f141ef2a057ecb01616b03ef183bebca0015/diff",
"WorkDir": "/var/lib/docker/overlay2/5d62fe71e2817166efae53507910f141ef2a057ecb01616b03ef183bebca0015/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:3e01818d79cd3467f1d60e54224f3f6ce5170eceb54e265d96bb82344b8c24e7",
"sha256:e451a5b02f12f2cf0041645df106eec8f62cf032a054a01ce6a2524f37ba5e8d",
"sha256:1999bf03d1e351a5cfe7d6d37c94850c13eac004a30f4c957d2168b51f03533a",
"sha256:0119738b34b3dbe4a1f77b5f4671bda4d209cb763c7fd467143004fe0b18dc14"
]
},
"Metadata": {
"LastTagTime": "2024-12-17T15:34:35.66578685+08:00"
}
}