镜像构建历史
# 2024-12-17 15:09:45 0.00B 设置默认要执行的命令
CMD ["uvicorn" "main:app" "--host" "0.0.0.0" "--port" "8001"]
# 2024-12-17 15:09:45 0.00B 声明容器运行时监听的端口
EXPOSE map[8001/tcp:{}]
# 2024-12-17 15:09:45 27.65MB 执行命令并创建新的镜像层
RUN /bin/sh -c pip install --no-cache-dir -r requirements.txt # buildkit
# 2024-12-17 15:09:31 101.00B 复制新文件或目录到容器中
COPY ./requirements.txt /app # buildkit
# 2024-12-17 15:09:31 125.00B 复制新文件或目录到容器中
COPY ./.env /app # buildkit
# 2024-12-17 15:09:31 402.00B 复制新文件或目录到容器中
COPY ./main.py /app # buildkit
# 2024-12-17 15:09:31 34.94KB 复制新文件或目录到容器中
COPY ./api /app/api # buildkit
# 2024-12-06 12:38:05 0.00B 设置工作目录为/app
WORKDIR /app
# 2024-12-05 00:49:14 0.00B 设置默认要执行的命令
CMD ["python3"]
# 2024-12-05 00:49:14 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 00:49:14 43.18MB 执行命令并创建新的镜像层
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 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==65.5.1' wheel ; pip3 --version # buildkit
# 2024-12-05 00:49:14 0.00B 设置环境变量 PYTHON_SHA256
ENV PYTHON_SHA256=bfb249609990220491a1b92850a07135ed0831e41738cf681d63cf01b2a8fbd1
# 2024-12-05 00:49:14 0.00B 设置环境变量 PYTHON_VERSION
ENV PYTHON_VERSION=3.10.16
# 2024-12-05 00:49:14 0.00B 设置环境变量 GPG_KEY
ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D
# 2024-12-05 00:49:14 8.48MB 执行命令并创建新的镜像层
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-12-05 00:49:14 0.00B 设置环境变量 LANG
ENV LANG=C.UTF-8
# 2024-12-05 00:49:14 0.00B 设置环境变量 PATH
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# 2024-12-02 08:00:00 74.82MB
# debian.sh --arch 'amd64' out/ 'bookworm' '@1733097600'
镜像信息
{
"Id": "sha256:041e5159caa59673d55be1f8abc2baab006a6b4516e7bd0f7ffb697139ecfb7e",
"RepoTags": [
"hpyp/bbapi:latest",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/hpyp/bbapi:latest"
],
"RepoDigests": [
"hpyp/bbapi@sha256:a9141e7178cd48802f47c3164c9eff401ecef587cb0406b830d0521cbe93de57",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/hpyp/bbapi@sha256:9c7aea7057266ab85400042059f546bf755efbe0b5ac895ce8d5c5a4d499ca36"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-12-17T07:09:45.366331713Z",
"Container": "",
"ContainerConfig": null,
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8001/tcp": {}
},
"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": [
"uvicorn",
"main:app",
"--host",
"0.0.0.0",
"--port",
"8001"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "/app",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 154162002,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/cb648eff0273332a124486b6ce4533b73fe3d8a75f2aba27a9e9523bfb4c73ba/diff:/var/lib/docker/overlay2/49548030e188e835b46904aebaa6c53e4a3b2188b1c85cc81eb08b5501d703bd/diff:/var/lib/docker/overlay2/9a33ea3d4bad04508ea39f16a1f75d9c26ec8d536c2338514a4812049aba0664/diff:/var/lib/docker/overlay2/51ba860990089b5c6dd05531ad9e77a5d8aab91e7c41e062430ea67ec26373ab/diff:/var/lib/docker/overlay2/432947f449bca5e53bd50848fa28b15b8174202eda87a8358a3c1d605b61253d/diff:/var/lib/docker/overlay2/6c72f04d1d5a7631de7d8f2d7f3dfed0e1042606b87314245c15abf5cec19455/diff:/var/lib/docker/overlay2/2374344188cb05b3c92f13891b43cdae04e178558c663e19b7f1c11d3b2a2f58/diff:/var/lib/docker/overlay2/39ef620bfe943403602d1ae590f2b782d0a9977b71d413cf1d262e5208734bd0/diff:/var/lib/docker/overlay2/404e59c4c9adc52232d40ea19adf6c8d76b2fc9392dc54e49d9840bbd9ffc580/diff",
"MergedDir": "/var/lib/docker/overlay2/22b3929829ecd7ec888895c3e0f1a706fcca0b43d2bf088ec959a74966a07166/merged",
"UpperDir": "/var/lib/docker/overlay2/22b3929829ecd7ec888895c3e0f1a706fcca0b43d2bf088ec959a74966a07166/diff",
"WorkDir": "/var/lib/docker/overlay2/22b3929829ecd7ec888895c3e0f1a706fcca0b43d2bf088ec959a74966a07166/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:c0f1022b22a9b36851b358f44e5475e39d166e71a8073cf53c894a299239b1c5",
"sha256:15845fc8070f7b52ac55ae1548ee29644d904ccec4447c0e3e5890fe7da157c5",
"sha256:4694bafa367df367acb4e4fa4440a8ec89fd03fc454b18670a791ce49da6a87f",
"sha256:597aba2d377966934fa10065d02ac49de20f44707f47489dd98de14f7ad4d6fa",
"sha256:b06f4663694ac43993d4fb8a951aa2150a5d35c8eff7db6b2ec446600a4a5ed2",
"sha256:1c217bf6daed35a0b0c53f08962ee321ad34f811d334668cd6d1d0eb37764705",
"sha256:4c288c9f9441cd7adbe1ddb5cbe3c55a3b5d0a5595305001f8bac87b800f36bf",
"sha256:355542b2255bb5024bfb24210512902f437b98f9ce39d7f87d5460598792e8a9",
"sha256:5f5745cc58636785b4ed8dde1a781b70f49efb5720fdbf0b6b6e99a184888bda",
"sha256:72f9fffdea9b8e8becfdfd8aadbec2b9962243d461a60480cee9bdae0126aff0"
]
},
"Metadata": {
"LastTagTime": "2025-01-16T20:46:53.739360447+08:00"
}
}