使用Docker Swarm 搭建S3(minio )每个节点启动一个副本
安装docker
或CentOS版本 CentOS 快速安装docker
初始化docker Swarm
确保 NFS 正常工作
NFS 服务 地址 10.0.2.100:/harbor_nas
配置文件 docker-minio-compose.yml
启动命令 docker stack deploy -c docker-minio-compose.yml --with-registry-auth minio
version: '3.7'
services:
minio:
image: minio/minio:RELEASE.2020-03-19T21-49-00Z
hostname: minio
environment:
- TZ=Asia/Shanghai # 设置容器时区与宿主机保持一致
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
volumes:
- harbor_nas:/data
ports:
- "9000:9000"
networks:
- minio_distributed
deploy:
mode: global
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
command: server /data
volumes:
harbor_nas:
driver: local
driver_opts:
type: "nfs"
o: "addr=10.0.28.100,vers=4,rw"
device: ":/harbor_nas"
networks:
minio-network:
driver: overlay
网友评论