# 启动个nginx
docker run --detach --publish 80:80 --name webserver nginx
# 停止nginx
docker container stop webserver
# 删除容器
docker container rm webserver
–detach等于-d 后后台运行的意思
可参考链接:
http://www.runoob.com/docker/docker-command-manual.html
CentOS 7安装docker:
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io