Docker学习2.0————安装与使用

准备(centos)

首先检查是否在系统内核是否支持&检查是否在系统中安装过docker

#uname -a

#find -name 'docker'

安装安装包

#yum install -y yum-utils

设置镜像仓库地址

#yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

#cd /etc/docker

#touch daemmon.json&vim daemmon.json

内容为{ "registry-mirrors": ["https://alzgoonw.mirror.aliyuncs.com"] }

更新yum软件包索引

#yum makecache fast

安装docker相关的

#yum install docker-ce docker-ce-cli containerd.io

启动docker

systemctl start docker

简单命令

docker verion                                查看docker版本

docker run hello-world                  运行hello-world镜像(如果没有会先拉取镜像)

docker images                              查看所有的镜像

你可能感兴趣的:(docker)