- 28080:8080 depends_on: - tracker storage1: container_name: storage1 image: ygqygq2/fastdfs-nginx:latest command: storage #network_mode: host networks: - fastdfs-net environment: - TRACKER_SERVER=tracker:22122 volumes: - /var/fdfs/storage1:/var/fdfs ports: - 28081:8080 depends_on: -...
Use docker-compose docker-compose up -d Tips: 使用network_mode: host时注意添加 hosts,最好是把所有节点 hosts 都添加上,而且 tracker 地址不能使用 127.0.0.1,可以使用内网 IP 示例: version:'3'services:tracker:container_name:trackerimage:ygqygq2/fastdfs-nginx:latestcommand:trackernetwork_mode:hostvolu...
docker-compose.yaml 示例文件如下 version:'3'services:tracker:image:ygqygq2/fastdfs-nginx:latestcontainer_name:trackerrestart:alwaysvolumes:-"/data/fdfs/tracker:/var/fdfs"network_mode:hostcommand:"tracker"storage:image:ygqygq2/fastdfs-nginx:latestcontainer_name:storage0restart:alwaysvolumes:-"/data/f...
version:'3'services:tracker:container_name:trackerimage:ygqygq2/fastdfs-nginx:latestcommand:trackernetwork_mode:hostvolumes:-/var/fdfs/tracker:/var/fdfsports:-22122:22122storage0:container_name:storage0image:ygqygq2/fastdfs-nginx:latestcommand:storagenetwork_mode:hostextra_hosts:-"tracker:10.0.0.10"...
FastDFS# dockerpull ygqygq2/fastdfs-nginxdockerrun-dit-p8888:8080--namefastdfs_tracker-v/var/fdfs/tracker:/var/fdfs ygqygq2/fastdfs-nginx:latest trackerdockerrun-dit--network=container:$trackerID--namefastdfs_storage0-eTRACKER_SERVER=$trackerIP:22122-v/var/fdfs/storage0:/var/fdfs ygqygq2...