Skip to main content
 首页 » 编程设计

python之使用 docker python "no space left on device"后无法正确重启 ubuntu,外围设备上没有可用内存

2024年08月14日26mayingbao

今天我尝试使用命令“docker build --tag my-python-app”创建我项目最终版本的 docker(我的项目大小为 3.2 Go)。我在操作过程中遇到了几个问题:我运行了 docker 命令。它好几次是因为在文件“Dockerfile”中,我指定了错误的 python 和错误的 pip。无论如何,现在我“设备上没有剩余空间”并且我的屏幕在闪烁。

目前,我尝试了自动删除,但仍然没有足够的空间。

有人知道发生了什么事吗?

请您参考如下方法:

您是否尝试删除未使用的 Docker 镜像或容器?

您可以通过运行查看图像列表:

docker images

您可以像这样删除它们:

docker rmi <id>

容器的过程非常相似:

docker ps -a

和:

docker rm <id>

小心不要删除用过的容器或图像。