docker使用指南&疑难杂症

发布时间:2024年01月18日

使用指南

构建包不成功留下一堆废镜像和容器<none>如何清理?
https://blog.csdn.net/catoop/article/details/91908719

疑难杂症

问题:Dockerfile构建镜像,旧文件一点没动,结果执行到apt各种包会报找不到。returned a non-zero code: 100

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/bionic/InRelease  Temporary failure resolving 'mirrors.163.com'
W: Failed to fetch http://mirrors.163.com/ubuntu/dists/bionic-updates/InRelease  Temporary failure resolving 'mirrors.163.com'
W: Failed to fetch http://mirrors.163.com/ubuntu/dists/bionic-backports/InRelease  Temporary failure resolving 'mirrors.163.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package net-tools

The command '/bin/sh -c apt-get update &&    apt-get install net-tools -y &&    apt-get install iputils-ping -y &&    apt-get install vim -y &&    apt-get autoclean &&    apt-get autoremove' returned a non-zero code: 100

解决:都说加源,对我一点用都不管。最后是这个起作用了。
可能是docker的dns有问题。https://zhuanlan.zhihu.com/p/422089996

文章来源:https://blog.csdn.net/weixin_43941593/article/details/135657651
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。