version: "3" # 必须指定docker-compose版本, 需要和docker版本对应 services: # 一组容器 data-synchronism: # 服务名称 container_name: data_sync image: find_source:1.0 volumes: # 映射文件夹 - /mnt/find_source:/app network_mode: "host" # 指定网络名称 restart: always privileged: true shm_size: 10GB logging: driver: "json-file" options: max-size: "200k" max-file: "10" command: "python build_sync_data.py" data-excavate: container_name: data_excavate image: find_source:1.0 volumes: # 映射文件夹 - /mnt/find_source:/app network_mode: "host" restart: always privileged: true shm_size: 10GB logging: driver: "json-file" options: max-size: "200k" max-file: "10" command: "python build_excavate.py 10"