我有一个通过www.example.com管道构建的docker镜像circle.ci,它从AWS中提取ECR镜像并托管在EB/EC2上,并且无法连续构建,并出现以下错误:
#5 0.329 Get:1 http://deb.debian.org/debian bookworm InRelease [147 kB]
#5 0.339 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
#5 0.339 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
#5 0.401 Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8904 kB]
#5 0.548 Get:5 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [27.7 kB]
#5 1.597 Fetched 9179 kB in 1s (7185 kB/s)
#5 1.597 Reading package lists...
#5 2.165 E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
#5 2.165 E: Sub-process returned an error code
#5 ERROR: executor failed running [/bin/sh -c apt-get update]: exit code: 100
------
> [dev 2/7] RUN apt-get update:
------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get update]: exit code: 100
我的Docker文件
FROM python:3.9-slim as dev
ENV DEBIAN_FRONTEND=noninteractive
# Custom cache invalidation
ARG CACHEBUST=1
RUN apt-get update
RUN apt-get install -y pipenv default-libmysqlclient-dev libcurl4-openssl-dev libssl-dev
COPY Pipfile* ./
RUN pipenv install --system --deploy --dev
ENV APP_DIR=/app/withinhealth
RUN mkdir -p ${APP_DIR}
WORKDIR ${APP_DIR}
FROM dev as prod
COPY . ./
1条答案
按热度按时间new9mtju1#
看起来正在使用的docker版本需要更新。我在使用旧版本的docker时也遇到了这个问题(
20.10.6
-不要问)。几天前有一个Debian版本。
python:3.9-slim
来自这个新的Debian版本,并且在运行基于这个Debian版本的镜像时会遇到一些问题,这些镜像与旧版本的docker(证书和/或密钥,可能是glibc的更新版本)。复制的最小步骤(使用docker版本
20.10.6
):将Docker升级到
24.0.2
: