安装Docker
Willem Zhang Lv6

检查是否安装过docker

1
yum list installed | grep docker

安装docker

1
yum -y install docker

启动docker

1
systemctl start docker

查看docker服务状态

1
systemctl status docker

使用

拉取image

docker pull zhengfan2014/yesbot

image存放位置

cd /var/lib/docker

参考:https://www.cnblogs.com/Rightsec/p/10222950.html

查询images

1
2
# 注意复数
docker images

运行images

1
docker run docker.io/zhengfan2014/yesbot

停止正在运行的images

1
docker stop [imageName]

服务类image运行后不会自动关闭。可以执行docker stop imageName停止。

查看正在运行的容器

1
docker ps

参考:

https://blog.csdn.net/China_110/article/details/84447349

  • Post title:安装Docker
  • Post author:Willem Zhang
  • Create time:2021-04-23 07:26:32
  • Post link:https://ataraxia.top/2021/04/22/安装Docker/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
 Comments