Docker入门笔记(Centos7)

centos7

wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo

vim docker-ce.repo

:%s@https://downdload.docker.com/@https://mirrors.tuna.tsinghua.edu.cn/docker-ce/@

yum repolist

yum install docker-ce

mkdir /etc/docker

vim /etc/docker/daemon.json

{
  "registry-mirrors":["https://registry.docker-cn.com"]
}

systemctl start docker.service

安装完成~

 

镜像查看

https://hub.docker.com/r/library

搜索后到tags查看版本跟大小

使用 docker image pull 软件:版本

删除 docker image rm 

查看 docker image ls

创建容器 docker containers create

列出所以容器 docker ps

启动 docker run --name 名称 参数 镜像:版本

原文地址:https://www.cnblogs.com/it-taosir/p/11823888.html