Getting invalid mount config for type “bind”: bind source path does not exist in docker

前端 未结 1 2077
庸人自扰
庸人自扰 2021-01-17 12:57

I am trying to deploy following docker-compose into docker swarm cluster.

version: \'3.2\'
services:
  jenkins:
    image: jenkins/jenkins:lts
    ports:
            


        
相关标签:
1条回答
  • 2021-01-17 13:06

    This is clearly documented in Docker Swarm BIND MOUNTS

    If you bind mount a host path into your service’s containers, the path must exist on every swarm node. The Docker swarm mode scheduler can schedule containers on any machine that meets resource availability requirements and satisfies all constraints and placement preferences you specify.

    Unlike running a single container, the bind-mount host directory is not created if it doesn't exit. It must exist prior to running the container on a cluster node.

    0 讨论(0)
提交回复
热议问题