centos7上安装docker
首页->学习资料->微服务治理->docker 关键词: 发布时间:2018-04-26 07:40:51 浏览次数:1484


第一步:删除旧的docker(如果有的话)

yum remove docker*


然后:
yum install -y yum-utils device-mapper-persistent-data lvm2



下面是官方镜像地址:

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

如果用阿里去的镜像,上面的网址改为:http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo


然后:

yum install docker-ce

启动:

systemctl start docker

设为开机启动

systemctl enable docker


查看版本:

docker version

检查是否成功:

docker run hello-world

[root@localhost ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete 
Digest: sha256:6a65f928fb91fcfbc963f7aa6d57c8eeb426ad9a20c7ee045538ef34847f44f1
Status: Downloaded newer image for hello-world:latest

Hello from Docker!



docker desktop修改阿里云仓库:

{

  "registry-mirrors": [

    "https://krmu1x5v.mirror.aliyuncs.com"

  ],

  "insecure-registries": [],

  "debug": false,

  "experimental": false,

  "features": {

    "buildkit": true

  }

}


赞:(0)
踩:(0)
相关文章
docker容器中开启php扩展,制成新镜
docker容器中安装扩展后制成新镜像
如何在docker容器外执行php artisa
docker容器如何执行composer insta
docker容器内无法上网ping不通外网
将docker中的文件拷贝到docker外
docker中nginx可以访问html无法访
docker容器中安装amqp扩展
docker安装及入门教程
docker 命令
热门文章
win7中将文件拷贝到虚拟机linux下
phpexcel设置行高及列宽,背景颜色,
rabbitmq无法启动
intellij idea不显示git push按钮
php7中使用mongodb的aggregate进行
centos7.4 64位下swoole安装及配置
laravel页面静态化的方法
navicate连接mycat报1184错误
单点登录sso原理及php实现方式及de
devops-jenkins容器为pending状态
好评文章
phpexcel设置行高及列宽,背景颜色,
php7中使用mongodb的aggregate进行
intellij idea打开文件所在文件夹
windows下使用MongoDB Compass Com
win7中将文件拷贝到虚拟机linux下
laravel 中悲观锁 & 乐观锁的使用
单点登录sso原理及php实现方式及de
navicate连接mycat报1184错误
rabbitmq无法启动
laravel整合dingo/api方法步骤:jwt
标签
rabbitmq mysql备份 elasticsearch golang swoole
我的项目
【github】www.github.com/hurong241
【码云】gitee.com/hu_rong/projects
【docker hub】hub.docker.com/repositories/hurong241
【packagist】packagist.org/users/hurong241/packages
站点信息
建站时间:2011年
文章数:607篇
浏览数:938423
粤ICP备18028092号-1  微信:hurong241