docker运行pull异常

参考 (1条消息) devicemapper: Error running deviceCreate (ActivateDevice) dm_task_run failed_weixin_30463341的博客-CSDN博客

参考 在升级过内核的机器上安装docker遇到的一个错误 - 星辰大海ゞ - 博客园 (cnblogs.com)

安装好docker之后pull时报410错误,错误如下

[root@rocketmq-nameserver2 rpm]# docker run -it -d --name nginx_web nginx:latest Unable to find image 'nginx:latest' locally latest: Pulling from nginx cda1318ca9c0: Download complete 180310c1305f: Download complete 06dc5d9ec864: Download complete 7ef5a4462d20: Download complete 5f4b1004e867: Download complete 4d89bb36e039: Download complete bcf882d087ff: Download complete 3755818a8f8d: Download complete 64c472ebbd5a: Download complete 385caf8fda91: Download complete a2f5500ef78f: Download complete b44969887e44: Download complete 8f580a01ae6b: Download complete 75762d5afe32: Download complete 8a7119ff8567: Download complete Pulling repository nginx Error: Status 410 trying to pull repository library/nginx: "<html>\r\n<head><title>410 Gone</title></head>\r\n<body>\r\n<center><h1>410 Gone</h1></center>\r\n<hr><center>openresty</center>\r\n</body>\r\n</html>\r\n" You have mail in /var/spool/mail/root

试了多种解决方案,最终采用重新启动docker,并携带镜像作为启动参数,来下载镜像

[root@rocketmq-nameserver2 docker]# docker -d --registry-mirror=http://hub-mirror.c.163.com WARN[0000] You are running linux kernel version 2.6.32-642.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.10.0. INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) ERRO[0000] Unable to delete device: Error running DeleteDevice dm_task_run failed INFO[0000] [graphdriver] using prior storage driver "devicemapper" WARN[0000] Running modprobe bridge nf_nat failed with message: , error: exit status 1 INFO[0000] Loading containers: start. INFO[0000] Loading containers: done. INFO[0000] Daemon has completed initialization INFO[0000] Docker daemon commit=786b29d/1.7.1 execdriver=native-0.2 graphdriver=devicemapper version=1.7.1 INFO[0005] POST /v1.19/images/create?fromImage=nginx%3Alatest INFO[0071] GET /v1.19/info

这下可以下载镜像了,但是报了另一个错误

[root@rocketmq-nameserver2 rpm]# docker pull nginx latest: Pulling from nginx cda1318ca9c0: Download complete 180310c1305f: Download complete 06dc5d9ec864: Download complete 7ef5a4462d20: Download complete 5f4b1004e867: Download complete 4d89bb36e039: Download complete bcf882d087ff: Download complete 3755818a8f8d: Download complete 64c472ebbd5a: Download complete 385caf8fda91: Download complete a2f5500ef78f: Download complete b44969887e44: Download complete 8f580a01ae6b: Download complete 75762d5afe32: Download complete 8a7119ff8567: Download complete Driver devicemapper failed to create image rootfs cda1318ca9c03203af43c89184791b170b8936af0dbf5115a0d13c52b73e3ecd: Error running DeviceCreate (createSnapDevice) dm_task_run failed You have mail in /var/spool/mail/root

处理方案,清理空间

[root@rocketmq-nameserver2 docker]# service stop docker stop: 未被识别的服务 [root@rocketmq-nameserver2 docker]# rm -rf /var/lib/docker/* You have mail in /var/spool/mail/root [root@rocketmq-nameserver2 docker]# service restart docker restart: 未被识别的服务 [root@rocketmq-nameserver2 docker]# service docker restart Stopping docker: [FAILED] Starting docker: [ OK ] [root@rocketmq-nameserver2 docker]# rm -rf /var/lib/docker/* [root@rocketmq-nameserver2 docker]# service docker restart Stopping docker: [FAILED] Starting docker: [ OK ] [root@rocketmq-nameserver2 docker]# service docker stop Stopping docker: [ OK ] [root@rocketmq-nameserver2 docker]# rm -rf /var/lib/docker/* [root@rocketmq-nameserver2 docker]# service docker restart

再次执行pull命令

[root@rocketmq-nameserver2 rpm]# docker search hello-world NAME DESCRIPTION STARS OFFICIAL AUTOMATED hello-world Hello World! (an example of minimal Docker... 2038 [OK] kitematic/hello-world-nginx A light-weight nginx container that demons... 152 tutum/hello-world Image to test docker deployments. Has Apac... 90 [OK] dockercloud/hello-world Hello World! 20 [OK] crccheck/hello-world Hello World web server in under 2.5 MB 17 [OK] vad1mo/hello-world-rest A simple REST Service that echoes back all... 7 [OK] rancher/hello-world 4 ppc64le/hello-world Hello World! (an example of minimal Docker... 2 ansibleplaybookbundle/hello-world-db-apb An APB which deploys a sample Hello World!... 2 [OK] thomaspoignant/hello-world-rest-json This project is a REST hello-world API to ... 2 ansibleplaybookbundle/hello-world-apb An APB which deploys a sample Hello World!... 1 [OK] koudaiii/hello-world 0 freddiedevops/hello-world-spring-boot 0 strimzi/hello-world-streams 0 garystafford/hello-world Simple hello-world Spring Boot service for... 0 [OK] tsepotesting123/hello-world 0 kevindockercompany/hello-world 0 dandando/hello-world-dotnet 0 armswdev/c-hello-world Simple hello-world C program on Alpine Lin... 0 businessgeeks00/hello-world-nodejs 0 tacc/hello-world 0 golift/hello-world Hello World Go-App built by Go Lift Applic... 0 okteto/hello-world 0 strimzi/hello-world-consumer 0 strimzi/hello-world-producer 0 [root@rocketmq-nameserver2 rpm]# docker pull hello-world latest: Pulling from hello-world 203780e85530: Pull complete 1004d5990604: Pull complete Digest: sha256:b7be85e93a1455dd1c7d5e940cdf5844d9f8dabdc9633bf5b28905687a447057 Status: Downloaded newer image for hello-world:latest You have mail in /var/spool/mail/root [root@rocketmq-nameserver2 rpm]# docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值