散装java 散装java
首页
  • Java基础
  • JVM
  • Java多线程
  • 知识点
  • 案例
  • Redis
  • RabbitMQ
  • Kafka
  • Elasticsearch
  • MySQL
  • Linux
  • Docker
  • Zookeeper
  • Nginx
  • Git
  • JMeter
  • Gradle
  • 常见BUG
  • 常见解决方案
  • 资源
  • 问答
💖支持
Gitee (opens new window)
首页
  • Java基础
  • JVM
  • Java多线程
  • 知识点
  • 案例
  • Redis
  • RabbitMQ
  • Kafka
  • Elasticsearch
  • MySQL
  • Linux
  • Docker
  • Zookeeper
  • Nginx
  • Git
  • JMeter
  • Gradle
  • 常见BUG
  • 常见解决方案
  • 资源
  • 问答
💖支持
Gitee (opens new window)
  • 运维导读
  • Linux

    • Linux系统根目录概述
    • Linux常用操作指令
    • Linux如何跑一个定时任务
  • Docker

    • Docker导读
    • 常用 Docker 指令
    • Docker Compose 安装
    • Docker Compose 常用指令
      • Docker Compose 常用指令
        • 启动、停止、重启 等常用指令
      • 参数说明
  • Zookeeper

    • Zookeeper集群搭建
  • Nginx

    • Windows下安装使用 Nginx
    • Nginx 配置负载均衡
  • Git

    • Git 清空提交记录
  • GitLab

    • docker compose 搭建gitlab私服
  • 运维
  • Docker
散装java
2022-12-28
目录

Docker Compose 常用指令

# Docker Compose 常用指令

# 启动、停止、重启 等常用指令

# 启动 -f 指定文件 -d 指的是后台启动
docker-compose -f docker-compose-redis.yml up -d
# 停止
docker-compose -f docker-compose-redis.yml stop
# 停止并删除服务(可能会切断容器间的网络)
docker-compose -f docker-compose-redis.yml down
# 查看日志
docker-compose -f docker-compose-redis.yml logs
# 验证docker-compose.yml 配置文件是否正确,正确的情况下不会输出任何东西
docker-compose -f docker-compose-redis.yml config -q
# 重启
docker-compose -f docker-compose-redis.yml restart

1
2
3
4
5
6
7
8
9
10
11
12
13

# 参数说明

docker-compose [-f <arg>...] [options] [COMMAND] [ARGS...]
1
options指令 说明
build Build or rebuild services
config Validate and view the Compose file
create Create services
down Stop and remove resources
events Receive real time events from containers
exec Execute a command in a running container
help Get help on a command
images List images
kill Kill containers
logs View output from containers
pause Pause services
port Print the public port for a port binding
ps List containers
pull Pull service images
push Push service images
restart Restart services
rm Remove stopped containers
run Run a one-off command
scale Set number of containers for a service
start Start services
stop Stop services
top Display the running processes
unpause Unpause services
up Create and start containers
version Show version information and quit
上次更新: 2022/12/29, 19:53:09
Docker Compose 安装
Zookeeper集群搭建

← Docker Compose 安装 Zookeeper集群搭建→

Theme by Vdoing | Copyright © 2022-2024 散装java | MIT License | 鲁ICP备2022022143号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式