在我的 Mac 中,我运行的是 minikube,版本
minikube version: v1.24.0 commit: 76b94fb3c4e8ac5062daf70d60cf03ddcc0a741b
使用 VirtualBox,使用此命令
minikube start --vm-driver virtualbox --docker-env=[REGISTRY_PATH="myregistrypath/",BASE_VERSION=local] -p mymachine
我正在使用 docker-compose 来运行 docker 镜像。我的 docker-compose.yaml 的相关部分是
version: "3.7"
services:
base:
build:
context: .
dockerfile: build/base/Dockerfile
image: mymachine/base:${MYMACHINE_BASE_VERSION}
command: /bin/false
与此对应的Dockerfile 以以下内容开头:
FROM python:3.8-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
python 映像已正确检索,但 apt-get update 命令失败。几天前,它工作正常。现在不行了,据我所知,我没有做任何更改。
我收到的错误是:
Step 3/10 : RUN apt-get -y update
---> Running in 5fee40f42100
Get:1 http://deb.debian.org/debian bookworm InRelease [147 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8904 kB]
Get:5 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [27.7 kB]
Fetched 9179 kB in 2s (5714 kB/s)
Reading package lists...
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'
E: Sub-process returned an error code
知道如何修复这个问题吗?