Docker-compose 教程
felix9ia ... 2021-3-9 小于 1 分钟
# Docker-compose 教程
用于单机的容器编排
# 版本
一下是具体版本的配置
# 3.9
services:
zookeeper:
image: zookeeper:latest
ports:
- 2181:2181
restart: always
healthcheck: # 两次健康检查的周期
test: ["CMD", "curl", "-f", "http://localhost:2181"]
interval: 30s
timeout: 10s # test 指令运行超时时间
retries: 3 # 连续重试的次数
start_period: 40s #
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# 参考
docker-compose push (opens new window)
https://devdojo.com/bobbyiliev/how-to-install-docker-and-docker-compose-on-raspberry-pi
Env_file 和 .env 的区别