# docker使用方法(搭建酸酸举例)

1 min read
Table of Contents

CentOS 7安装
(阿里云新机测试正常)

安装一些必要的系统工具:
yum install -y yum-utils device-mapper-persistent-data lvm2
添加软件源信息:
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
更新 yum 缓存:
yum makecache fast
安装 Docker-ce(ce应该是免费版,还有个收费版,可以自行百度):
yum -y install docker-ce
启动 Docker 后台服务:
systemctl start docker
测试运行 hello-world:
docker run hello-world
另外一些常用命令具体杂用可以去百度,很多参数):
docker pull
docker run
docker ps
docker ps -aq
docker stop $(docker ps -aq)
docker rm $(docker ps -a -q)

💬 回复: Jun (2019-09-21)

常用命令
https://www.runoob.com/docker/docker-command-manual.html


Comments