docker-compose安装fastdfs

docker-compose安装fastdfs

编写配置文件docker-compose.yml

version: '3'
services:
  tracker:
    image: delron/fastdfs
    container_name: tracker
    restart: always
    ports:
      - 22122:22122
    volumes:
      - ./data/fastdfs/tracker:/var/fdfs
    networks:
      my_net:
        ipv4_address: 172.30.0.60
  storage:
    image: delron/fastdfs
    container_name: storage
    restart: always
    ports:
      - 23000:23000
      - 80:8888
    volumes:
      - ./data/fastdfs/storage:/var/fdfs
    environment:
      - TRACKER_SERVER=tracker:22122
    networks:
      my_net:
        ipv4_address: 172.30.0.62
    command: "storage"
networks:
  my_net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.30.0.0/16

启动

mdkir -p ./data/fastdfs/tracker
mdkir -p ./data/fastdfs/storage
docker-compose up -d
posted @ 2024-01-03 17:13  明月心~  阅读(196)  评论(0编辑  收藏  举报