docker-compose容器化构建minio服务
minio的yml文件
cat minio.yml
version: '3.0'
services:
tbc-minio:
image: minio/minio
ports:
- "9080:9000"
volumes:
- /data/minio/data:/data
- /data/minio/config:/root/.minio
environment:
- MINIO_DOMAIN=tbc-minio
- MINIO_ACCESS_KEY=账户
- MINIO_SECRET_KEY=密码
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
restart: on-failure
准备挂载目录
mkdir /data/minio/data -p
mkdir /data/minio/config
启动
docker-compose -f minio.yml up -d