docker安装

Docker安装

Windows安装

检查docker是否安装成功

docker version

Client: Docker Engine - Community

 Version:           18.09.2

 API version:       1.39

 Go version:        go1.10.8

 Git commit:        6247962

 Built:             Sun Feb 10 04:12:31 2019

 OS/Arch:           windows/amd64

 Experimental:      false

 

拉取docker的测试镜像


docker pull hello-world

Using default tag: latest

latest: Pulling from library/hello-world

1b930d010525: Pull complete

Digest: sha256:4df8ca8a7e309c256d60d7971ea14c27672fc0d10c5f303856d7bc48f8cc17ff

Status: Downloaded newer image for hello-world:latest

运行docker的测试镜像


docker run hello-world

Hello from Docker!

This message shows that your installation appears to be working correctly.

Linux安装

准备安装:


#关闭防火墙:

关闭: systemctl stop firewalld

开机禁用  : systemctl disable firewalld



#修改相关配置然后重启

vi /etc/selinux/config

SELINUX=disabled

reboot

 

安装


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



yum-config-manager \

    --add-repo \

https://download.docker.com/linux/centos/docker-ce.repo

或添加阿里云的安装源

sudo yum-config-manager \

--add-repo \

http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo



sudo yum makecache fast



sudo yum -y install docker-ce



yum update xfsprogs



systemctl start docker



docker version



docker pull hello-world



docker run hello-world

 

问题


Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
的解决方法:

在命令行输入:yum clean all

 

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值