docker使用指南&疑难杂症

使用指南

一 常见命令

二 非常见情况

1 构建包不成功留下一堆废镜像和容器<none>如何清理?

https://blog.csdn.net/catoop/article/details/91908719

2 docker0 ip没了怎么办?

容器stop(不确定是否必须,关上保险),重启docker,再start容器

service docker restart

疑难杂症

1 non-zero code: 100

问题: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

而且直接ping mirrors.163.com是通的。

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

相关推荐

  1. docker使用指南&疑难

    2024-01-18 15:30:03       40 阅读
  2. spring事务失效(疑难

    2024-01-18 15:30:03       29 阅读
  3. 我遇到的前端疑难

    2024-01-18 15:30:03       12 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-18 15:30:03       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-18 15:30:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-18 15:30:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-18 15:30:03       18 阅读

热门阅读

  1. SQL语句详解四-DQL(数据查询语言-多表查询二)

    2024-01-18 15:30:03       37 阅读
  2. SSH远程登录详解

    2024-01-18 15:30:03       29 阅读
  3. k8s和knative的区别与联系

    2024-01-18 15:30:03       33 阅读
  4. 什么是PHP中的事务隔离级别?

    2024-01-18 15:30:03       33 阅读
  5. 后端开发笔记20240117

    2024-01-18 15:30:03       35 阅读
  6. SQL之删除索引

    2024-01-18 15:30:03       27 阅读