简体   繁体   English

如何在centos 7的未配置Docker上删除/安装Docker映像

[英]How to remove/install a docker image on an unconfigured Docker for centos 7

Using Centos 6.6 and 7 and deciding to move to centos 7 as there are some issues using docker with centos 6.6 (reboot issues for me) and i'm trying to pull the current centos image from docker. 使用Centos 6.6和7并决定移至centos 7,因为在centos 6.6中使用docker存在一些问题(对我来说是重新引导问题),我正尝试从docker中获取当前的centos映像。 (should just be docker pull centos ) (应该只是docker pull centos

However because i already had a docker image of centos installed on the 6.6 virtual machine, i thought it conflicts with the one im trying to pull on the centos 7. It states that the image (f1b something) is already being used on the system and is causing the download to not go through. 但是,因为我已经在6.6虚拟机上安装了centos的docker映像,所以我认为它与试图拉入centos 7的那个im冲突。它指出该映像(f1b东西)已在系统上使用,并且导致下载无法通过。 Simply going over to the centos 6.6 and trying to remove the images (which would be labeled as none by the way, thus you have to do docker images -a ),even with force, does nothing. 简单地转到centos 6.6并尝试删除映像(顺便将其标记为none,因此您必须执行docker images -a ),即使用力也不会执行任何操作。 The only solution so far to this is to do a full removal of docker and its dependencies, and reinstall it which should come package free. 到目前为止,唯一的解决方案是完全删除docker及其依赖项,然后重新安装它,该软件包应该是免费的。

Of course this is not the solution i want. 当然,这不是我想要的解决方案。 One of two things can happen. 可能发生两件事之一。 Either a way to make the two of them to coexist, or a way to remove the current one without removing any other current images. 一种使它们两者共存的方法,或者一种删除当前图像而不删除任何其他当前图像的方法。 Or if I am not getting this right, take an entirely different approach. 或者,如果我做错了,请采取完全不同的方法。

EDIT+1: Ok heres the actual error im receiving when doing the the docker pull... 编辑+1:好的,这是在执行docker pull时收到的实际错误...

f1b...: download complete
f1b...:error downloading dependant layers
c85...:Downloading [>
7322...: Error pulling image (latest) from docker.io/centos, endpoint :https://registry-1.docker.io/v1,Dr
7322...:Error pulling image (latest) from docker.io/centos, Driver devicemapper failed to create image rootfs
FATA[0012] Error pulling image (latest) from docker.io/centos, Driver device mapper failed to create image rootfs f1b...:error running DeviceCreate (createSnapDevice) dm_task_run failed

And looking over the problem more im not so sure if its because of the centos 6.6 like i had initially thought despite sharing the same ID's. 并且更多地查看问题不是很确定是否是因为像我最初考虑的centos 6.6尽管共享了相同的ID。

EDIT +2: Stranger still is that the fatal error codes keeps changing (im assuming those are FATA[0012]?) 编辑+2:仍然很奇怪,致命错误代码还在不断变化(假设这些错误代码是FATA [0012]?)

http://docker-sean.readthedocs.org/en/latest/chapter1.html http://docker-sean.readthedocs.org/en/latest/chapter1.html

Theres a config file that needs to be changed for centos 7 docker users which happened to be applying the following change OPTIONS='-g /docker/data -p /var/run/docker.pid' 有一个配置文件需要为centos 7 docker用户更改,该配置文件恰好正在应用以下更改OPTIONS='-g /docker/data -p /var/run/docker.pid'

in the vim/vi file of /etc/sysconfig/docker . /etc/sysconfig/docker的vim / vi文件中。

I swear docker is going to be the death of me... 我发誓码头工人将是我的死...

EDIT +1: Ok lets remap the solution to the following starting from a new centos 7 machine... 编辑+1:好吧,让我们从一台新的centos 7机器开始将解决方案重新映射到以下内容...

yum install docker
service docker start
docker pull centos

ERROR 错误

systemctl enable docker.service

ERROR? 错误?

sudo systemctl enable docker.service
systemctl start docker.service

ERROR? 错误?

yum remove docker
yum install epel-release.noarch
yum install docker-io
vim /etc/sysconfig/docker
OPTIONS='-g /docker/data -p /var/run/docker.pid'
service docker restart
docker pull centos

and thats how i got docker to work on the new VM if i mapped it correctly. 如果我正确映射了它,那就是我如何使docker在新VM上工作的方式。 Also one of the commands i might have used was a thin_check. 我可能使用的命令之一也是thin_check。 Somebody used it to verify docker in this link 有人用它来验证此链接中的 docker

EDIT +2: 编辑+2:

Oh wow, this would explain even better whats happening here. 哇,这可以更好地解释这里发生的事情。 See, the docker server can be installed straight out of the box with centos 7, however the daemon must still be installed from epel. 可以使用centos 7直接安装docker服务器,但是仍然必须从epel安装守护进程 As a reminder, the daemon is the item that actually runs the docker service. 提醒一下,守护进程是实际运行docker服务的项目。 The server just allows docker to connect to the internet and view its repositories. 该服务器仅允许docker连接到Internet并查看其存储库。 Link is right here . 链接就在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM