【docker】常用命令

启动docker服务

bash 复制代码
systemctl start docker

停止docker服务

bash 复制代码
systemctl stop docker

重启docker服务

bash 复制代码
systemctl restart docker

查看docker服务状态

bash 复制代码
systemctl status docker

设置开机启动docker服务

bash 复制代码
systemctl enable docker

设置关闭开机启动docker服务

bash 复制代码
systemctl disable docker

重载系统服务

bash 复制代码
systemctl daemon-reload

查看全部服务

bash 复制代码
systemctl list-unit-files --type service

搜索镜像

bash 复制代码
docker search  hello-world

拉去镜像

bash 复制代码
docker pull  hello-world

查看本地镜像

bash 复制代码
docker images

运行镜像

bash 复制代码
docker run hello-world

查看所有的容器

bash 复制代码
docker ps -a

问题1

当关闭docker时候提示:Warning: Stopping docker.service, but it can still be activated by:

docker.socket

执行下面命令

bash 复制代码
systemctl stop docker.socket



相关推荐
少妇的美梦10 小时前
logstash教程
运维
容器魔方10 小时前
Bloomberg 正式加入 Karmada 用户组!
云原生·容器·云计算
chen94510 小时前
k8s集群部署vector日志采集器
运维
chen94510 小时前
aws ec2部署harbor,使用s3存储
运维
muyun280015 小时前
Docker 下部署 Elasticsearch 8 并集成 Kibana 和 IK 分词器
elasticsearch·docker·容器
東雪蓮☆15 小时前
深入理解 LVS-DR 模式与 Keepalived 高可用集群
linux·运维·服务器·lvs
qq_2642208916 小时前
LVS负载均衡群集和LVS+Keepalived群集
运维·负载均衡·lvs
乌萨奇也要立志学C++16 小时前
【Linux】进程概念(二):进程查看与 fork 初探
linux·运维·服务器
雨落Liy16 小时前
Nginx 从入门到进阶:反向代理、负载均衡与高性能实战指南
运维·nginx·负载均衡
Nazi616 小时前
k8s的dashboard
云原生·容器·kubernetes