编程序

Centos7 安装Docker-ce

微信扫一扫,分享到朋友圈

Centos7 安装Docker-ce
收藏 0 52

Docker从1.13版本之后采用时间线的方式作为版本号,分为社区版CE和企业版EE。

社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务,比如经过官方测试认证过的基础设施、容器、插件等。

社区版按照stable和edge两种方式发布,每个季度更新stable版本,如17.06,17.09;每个月份更新edge版本,如17.09,17.10。

 一、安装docker

1、Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker 。

通过 uname -r 命令查看你当前的内核版本

$ uname -r

 

2、使用 root 权限登录 Centos。确保 yum 包更新到最新。

$ sudo yum update

 

3、卸载旧版本(如果安装过旧版本的话)

$ sudo yum remove docker docker-common docker-selinux docker-engine

 

4、安装需要的软件包, yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的

$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2

 

5、设置yum源

$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

6、可以查看所有仓库中所有docker版本,并选择特定版本安装

$ yum list docker-ce --showduplicates | sort -r

 

7、安装docker

$ sudo yum install docker-ce  #由于repo中默认只开启stable仓库,故这里安装的是最新稳定版17.12.0
$ sudo yum install <FQPN>  # 例如:sudo yum install docker-ce-17.12.0.ce

 

8、启动并加入开机启动

$ sudo systemctl start docker
$ sudo systemctl enable docker

9、验证安装是否成功(有client和service两部分表示docker安装启动都成功了)

$ docker version

 

二、问题

1、因为之前已经安装过旧版本的docker,在安装的时候报错如下:

Transaction check error:
  file /usr/bin/docker from install of docker-ce-17.12.0.ce-1.el7.centos.x86_64 conflicts with file from package 
docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64
file /usr/bin/docker-containerd from install of docker-ce-17.12.0.ce-1.el7.centos.x86_64 conflicts with file from package 
docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64
file /usr/bin/docker-containerd-shim from install of docker-ce-17.12.0.ce-1.el7.centos.x86_64 conflicts with file from package 
docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64
file /usr/bin/dockerd from install of docker-ce-17.12.0.ce-1.el7.centos.x86_64 conflicts with file from package 
docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64

 

2、卸载旧版本的包

$ sudo yum erase docker-common-2:1.12.6-68.gitec8512b.el7.centos.x86_64

 

3、再次安装docker

$ sudo yum install docker-ce

 

我还没有学会写个人说明!

软件开发:项目经理比你想像的更重要!

上一篇

北京政府机关东迁倒计时 城市副中心即将投入使用

下一篇

你也可能喜欢

52 条评论

  1. You have brought up a very fantastic details , regards for the post. Charmain Dallas Maryanna

  2. Valuable information. Lucky me I found your site by accident, and I am surprised why this coincidence did not came about earlier! I bookmarked it. Othilie Nicol Guzel

  3. I think you have noted some very interesting points, regards for the post. Guenevere Jessee Zimmerman

  4. A round of applause for your blog. Really thank you! Much obliged. Lidia Raleigh Kisung

  5. Hi i am kavin, its my first occasion to commenting anywhere, when i read this post i thought i could also create comment due to this good article. Marita Salomo Procora

  6. I have learn some good stuff here. Definitely value bookmarking for revisiting. Alexis Cass Janot

  7. Just beneath, are various absolutely not connected web sites to ours, on the other hand, they may be surely really worth going over. Merissa Bear Shelley

  8. You made some good points there. I searched the net for the issue as well as located most people will support with your website. Vin Axe Cristobal

  9. Wonderful post! We will be linking to this particularly great post on our site. Keep up the good writing. Sallie Matthias Estele

  10. Buna ziua! Am nevoie de un imprumut de 8000 lei. Nr meu este 0748555591. Callie Tab Aldarcy

  11. After looking into a number of the blog articles on your web site, I seriously like your technique of blogging. Christiane Lothaire Tadashi

  12. Good article. I will be facing some of these issues as well.. Matilde Guss Markowitz

  13. I pay a quick visit daily some blogs and information sites to read content, but this webpage provides quality based articles. Ellette Klement Xenia

  14. Real nice layout and wonderful articles , hardly anything else we need : D. Brittany Dermot Gora

  15. Very nice dewign and style and wonderful content, practically nothing else we require :D. Eleonora Gilles Rabin

  16. You have done an impressivejob and our whole community will be grateful to you. Lucilia Georg Raquel

  17. Enjoyed every bit of your article. Much thanks again. Want more. Vivian Raleigh Econah

  18. After looking into a few of the blog articles on your website, I honestly appreciate your technique of blogging. I bookmarked it to my bookmark site list and will be checking back soon. Please check out my website too and tell me what you think. Erna Erskine Ihab

  19. Im grateful for the blog. Much thanks again. Awesome. Oralie Garald Sacttler

  20. wow, awesome article post. Really looking forward to read more. Awesome. Norean Lennie Neumark

  21. When I originally left a comment I seem to have clicked the -Notify me when new comments are added- checkbox and from now on every time a comment is added I receive 4 emails with the same comment. Perhaps there is a way you are able to remove me from that service? Kudos! Anjanette Stanly Grussing

  22. This wrap is full of such beautiful spring colors! Donica Tobias Merry

  23. Having read this I believed it was really informative. I appreciate you finding the time and energy to put this article together. I once again find myself personally spending way too much time both reading and posting comments. But so what, it was still worth it! Margalit Malcolm Berners

  24. Wohh precisely what I was searching for, appreciate it for putting up. Jerrilyn Kermie Cornelia

  25. Beautiful photos! Makes me want to get AWAY from this snow. Karilynn Halsey Lassiter

  26. Wow! Finally I got a weblog from where I be capable of really take useful information concerning my study and knowledge. Rita Carlin Julius

  27. After research a few of the blog posts in your web site now, and I truly like your manner of blogging. I bookmarked it to my bookmark website listing and might be checking again soon. Pls take a look at my web page as well and let me know what you think. Phelia Lezley Granoff

  28. Pretty! This was an incredibly wonderful post. Thank you for providing this information. Shaun Alix Meijer

  29. Thanks for sharing your thoughts on stock market. Regards Abagail Huey Doi

  30. witam ekstra artykul ale na tablecie dlugo sie laduje Vale Hailey Ralph

  31. Hello, I think your site could be having internet browser compatibility problems. Whenever I take a look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping issues. I merely wanted to provide you with a quick heads up! Besides that, fantastic blog! Deeanne Rance Truda

  32. Looks fabulous, I wish I lived closer to Detroit to try tomorrow. I will have to wait for an overnight stay in the D and give it a try then!! Thank you for sharing your visit!! Crissie Brandy Goldie

  33. Have you ever considered about adding a little bit more than just your articles?
    I mean, what you say is important and all. However think about if you added some great images or video clips to give
    your posts more, “pop”! Your content is excellent but with images and clips, this website could certainly be one of the
    very best in its niche. Amazing blog!

  34. If some one desires to be updated with hottest technologies
    after that he must be pay a quick visit this website and be up to date daily.

  35. I get pleasure from, result in I discovered just what I
    was looking for. You’ve ended my 4 day long hunt!
    God Bless you man. Have a nice day. Bye

  36. Hello, I enjoy reading through your post. I wanted to write a little comment to support you.

  37. The road seemed to stretch on endlessly before us, but Alexis assured me that our journey was near an end. We’d turn before long into thick woods and travel through narrow, winding roads until we reached her family’s cabin. I had no choice but to trust her as GPS had given out nearly 20 minutes ago.

    “There’s good wifi and okay reception at the cabin,” she’d told me, “but you can’t get there unless you know the way.”

    So here I was, driving alone in the middle of god knows where with a girl who was my student just a couple of weeks ago. Her and her four best friends had been together from first grade all the way through high school and now they had graduated with very different futures ahead of them. They had decided to kick off “the best summer ever” with a week long stay at Alexis’s family cabin. Alexis and I were heading up before everyone else, the four other girls and four guys.

  38. The road seemed to stretch on endlessly before us, but Alexis assured me that our journey was near an end. We’d turn before long into thick woods and travel through narrow, winding roads until we reached her family’s cabin. I had no choice but to trust her as GPS had given out nearly 20 minutes ago.

    “There’s good wifi and okay reception at the cabin,” she’d told me, “but you can’t get there unless you know the way.”
    https://odom91658934.jimdofree.com/
    So here I was, driving alone in the middle of god knows where with a girl who was my student just a couple of weeks ago. Her and her four best friends had been together from first grade all the way through high school and now they had graduated with very different futures ahead of them. They had decided to kick off “the best summer ever” with a week long stay at Alexis’s family cabin. Alexis and I were heading up before everyone else, the four other girls and four guys.

  39. The road seemed to stretch on endlessly before us, but Alexis assured me that our journey was near an end. We’d turn before long into thick woods and travel through narrow, winding roads until we reached her family’s cabin. I had no choice but to trust her as GPS had given out nearly 20 minutes ago.

    “There’s good wifi and okay reception at the cabin,” she’d told me, “but you can’t get there unless you know the way.”
    https://medium.com/@tomkargongov/peyton-and-mark-pt-03-4129272e1825
    So here I was, driving alone in the middle of god knows where with a girl who was my student just a couple of weeks ago. Her and her four best friends had been together from first grade all the way through high school and now they had graduated with very different futures ahead of them. They had decided to kick off “the best summer ever” with a week long stay at Alexis’s family cabin. Alexis and I were heading up before everyone else, the four other girls and four guys.

  40. The road seemed to stretch on endlessly before us, but Alexis assured me that our journey was near an end. We’d turn before long into thick woods and travel through narrow, winding roads until we reached her family’s cabin. I had no choice but to trust her as GPS had given out nearly 20 minutes ago.

    “There’s good wifi and okay reception at the cabin,” she’d told me, “but you can’t get there unless you know the way.”
    https://notepin.co/shared/ikdcluv
    So here I was, driving alone in the middle of god knows where with a girl who was my student just a couple of weeks ago. Her and her four best friends had been together from first grade all the way through high school and now they had graduated with very different futures ahead of them. They had decided to kick off “the best summer ever” with a week long stay at Alexis’s family cabin. Alexis and I were heading up before everyone else, the four other girls and four guys.

  41. https://www.pinterest.com/pin/580753314454151506 – Конек-горбунок смотреть онлайн
    Americas, Special Report, US

发表评论

您的电子邮件地址不会被公开。 必填项已用 * 标注

提示:点击验证后方可评论!

插入图片