总的来说需要两个文件,如下:
1、compose.yml
需要注意:network_mode 模式、ip为宿主机ip
version: '3.3'services:master:network_mode: "host"image: chrislusf/seaweedfs # use a remote imagecommand: "master -ip=172.0.16.143 -ip.bind=172.0.16.143 -metricsPort=9324"volume:network_mode: "host"image: chrislusf/seaweedfs # use a remote imagecommand: 'volume -mserver="172.0.16.143:9333" -ip.bind=172.0.16.143 -port=8080 -metricsPort=9325'depends_on:- masterfiler:network_mode: "host"image: chrislusf/seaweedfs # use a remote imagecommand: 'filer -master="172.0.16.143:9333" -ip.bind=172.0.16.143 -metricsPort=9326'tty: truestdin_open: truedepends_on:- master- volumes3:network_mode: "host"image: chrislusf/seaweedfs # use a remote imagecommand: 's3 -filer="172.0.16.143:8888" -ip.bind=172.0.16.143 -metricsPort=9327'depends_on:- master- volume- filerwebdav:network_mode: "host"image: chrislusf/seaweedfs # use a remote imagecommand: 'webdav -filer="172.0.16.143:8888"'depends_on:- master- volume- filer
# prometheus:
# image: prom/prometheus:v2.21.0
# ports:
# - 9000:9090
# volumes:
# - ./prometheus:/etc/prometheus
# command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
# depends_on:
# - s3
2、install.sh
docker-compose -f seaweedfs-compose.yml -p seaweedfs up