如何设置docker-compose.yml让应用批处理在集群中运行本地文件列表?

How to setup docker-compose.yml to have an app batch run a list of local files in a cluster?

提问人:vascobnunes 提问时间:5/22/2019 最后编辑:Akshay barahatevascobnunes 更新时间:5/22/2019 访问量:594

问:

我想在多个文件上运行 vascobnunes/l8_reflectance 映像,以分布式形式运行到多个节点。

为了只运行一个文件,我成功地做到了:

Docker run -v /path/to/local/input/L8imagedir:/inputpath/in/container -v /path/to/local/output/L8imagedir:/outputpath/in/container vascobnunes/l8_reflectance:latest /inputpath/in/container /outputpath/in/container

但是现在我正在尝试弄清楚如何编写docker-compose.yml文件,以便通过集群(群)正确分配文件的处理。

谁能帮忙?

谢谢!

这是我尝试过的,但没有运气:

version: "3"
services:
  l8_reflectance:
    # replace username/repo:tag with your name and image details
    image: vascobnunes/l8_reflectance:v0.0.5
    volumes:
        - LC08_L1TP_203032_20190513_20190513_01_RT:/root/app/LC08_L1TP_203032_20190513_20190513_01_RT
        - app:/root/app/
    args:
        LC08_L1TP_203032_20190513_20190513_01_RT
        app
    deploy:
      replicas: 5
      restart_policy:
        condition: on-failure

docker docker-compose docker-swarm

评论


答: 暂无答案