![AWS-构建现代 Web 应用程序 (Mythical Mysfits)-Docker 镜像错误](https://linux22.com/image/753021/AWS-%E6%9E%84%E5%BB%BA%E7%8E%B0%E4%BB%A3%20Web%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20(Mythical%20Mysfits)-Docker%20%E9%95%9C%E5%83%8F%E9%94%99%E8%AF%AF.png)
我是网络和服务器管理领域的新手,没有任何经验。我正在尝试学习 AWS 的“MythicalMysfits”教程。另一篇文章很有帮助,我将 pip 更新到了 pip3,但现在我因为 Module 2B-Step1 - A 上的另一个错误而陷入困境,https://aws.amazon.com/getting-started/hands-on/build-modern-app-fargate-lambda-dynamodb-python/module-two/运行docker命令后,
docker build . -t REPLACE_ME_AWS_ACCOUNT_ID.dkr.ecr.REPLACE_ME_REGION.amazonaws.com/mythicalmysfits/service:latest
我仍然收到空间不足的错误,我尝试使用 cmd-sudo yum clean cache 清除缓存,但错误仍然存在-
Need to get 337 MB of archives.
After this operation, 1111 MB of additional disk space will be used.
E: You don't have enough free space in /var/cache/apt/archives/.
The command '/bin/sh -c apt-get install -y python3-pip python-dev build-essential.' returned a non-zero code: 100
我该如何修复这个错误?
答案1
实际上,经过一些研究和尝试,我能够通过运行以下命令成功解决空间问题 -
docker rmi $(docker images -q)
docker rm -v $(docker ps -qa)
或者
docker container prune