时间:2020-03-06来源:电脑系统城作者:电脑系统城
操作系统:CentOS Linux release 7.5.1804
容器引擎: Docker version 19.03.7
实战任务:描述问题及解决问题。
1.解决docker镜像无法删除的问题,原因是由于REPOSITORY公用一个IMAGE ID导致删除失败
[root@docker sky9890]# docker rmi $(docker images -q)
Error response from daemon: conflict: unable to delete 5766334bdaa0 (must be forced) - image is
referenced in multiple repositories
Error response from daemon: conflict: unable to delete 5766334bdaa0 (must be forced) - image is
referenced in multiple repositories
Error response from daemon: conflict: unable to delete 5766334bdaa0 (must be forced) - image is
referenced in multiple repositories
#一一删除即可解决问题
[root@docker sky9890]# docker rmi nginx:v1
[root@docker sky9890]# docker rmi nginx:1.11
[root@docker sky9890]# docker rmi nginx
2.遇到怎么都无法删除image的解决办法Error: No such images
[root@docker sky9890]# docker image rm $(docker image ls -a -q)
Error: No such image: 4e7840b49fad
Error: No such image: a1523e859360
Error: No such image: 0320ef7199ca
[root@docker sky9890]# docker rmi centos:latest
Error: No such image: centos:latest
[root@docker sky9890]# docker rmi 470671670cac
Error: No such image: 470671670cac
#删除sha256下面的缓存文件即可
[root@docker docker]# cd /var/lib/docker/image/overlay2/imagedb/content/sha256/
[root@docker sha256]# ll
总用量 96
-rw-------. 1 root root 8983 3月 2 12:35
0320ef7199cad90e23f7d5688a47beab304280b000284e0bd7fdad162ff5c9ec
-rw-------. 1 root root 2797 3月 2 12:28
470671670cac686c7cf0081e0b37da2e9f4f768ddc5f6a26102ccd1c6954c1ee
-rw-------. 1 root root 14511 3月 2 12:11
..................................................................
[root@docker sha256]# rm *
[root@docker sha256]# ll
总用量 0
3.mount参数会报Docker Unknown flag --mount
原因如下:
docker run support for the --mount option was only introduced in Docker 17.06. You are using Docker 1.13.1. You have two choices:
1. Update to Docker 17.06 or later if you can;
2. Use the -v approach to bind mount the volume you require e.g. docker run -v $(pwd):/home
解决方法:升级docker版本
2024-04-11
台式机电脑如何连接外接显示器2024-04-11
小新系列打印机手机配置网络的方法教程2024-04-11
Thinkpad 笔记本F1-F12快捷键分别是什么功能ThinkPad蓝牙鼠标如何配对解答步骤41U5008鼠标驱动官网地址: https://support.lenovo.com/en_US/downloads/detail.page?&LegacyDocID=MIGR-67201 第一种方式是比较传统的:使...
2024-04-11
故障现象: USB设备U盘、移动硬盘等插入后提示无法识别的设备,确认设备本身正常,设备可加电,或插入设备后加电但无任何反应,无法使用。新型号机器多表现为黄色USB接口存在此问题,...
2024-04-11