osx - Mount 'pwd' in swarm service using Docker for Mac -


i have followed guide set swarm cluster in docker mac: https://medium.com/@alexeiled/docker-swarm-cluster-with-docker-in-docker-on-macos-bdbb97d6bb07#.2x5gqgrkq

all seems work correctly , able see cluster.

$ docker node ls id                           hostname  status  availability  manager status 3ez478atbfrcwb66u892ccbpx    worker-2  ready   active 7qfb87e9n54q3at9enzgeeko1    worker-3  ready   active cnr8tyaf1qqgkpjqnn4wmnb1e *  moby      ready   active        leader eyksqiw6ewfks7t8fr48rppia    worker-1  ready   active 

now want create docker registry inside swarm.

the following fails:

$ docker service create --name registry -p 5000:5000 \ --mount "type=bind,source=$pwd,target=/var/lib/registry" \ --reserve-memory 100m registry 

with

$ docker service ps registry id                         name            image     node      desired state  current state                    error 2xflgt6jlqlbpgdjvfzbgbsbb  registry.1      registry  worker-1  ready          rejected less second ago  "invalid bind mount source, so…" 4u3a5bsdjavwubsgw9f0qhusx   \_ registry.1  registry  worker-3  shutdown       rejected 5 seconds ago           "invalid bind mount source, so…" bqtbchxwjry7repyb7q30yes7   \_ registry.1  registry  worker-1  shutdown       rejected 10 seconds ago          "invalid bind mount source, so…" 3e32pquyatzdnu8jvc88tfaih   \_ registry.1  registry  worker-3  shutdown       rejected 15 seconds ago          "invalid bind mount source, so…" 563lpzhz10ugu6tbckdzx41xe   \_ registry.1  registry  worker-1  shutdown       rejected 20 seconds ago          "invalid bind mount source, so…" 

inspecting container gives me:

... ... ...             "containerspec": {             "image": "registry",             "mounts": [                 {                     "type": "bind",                     "source": "/users/user1/cd-summit/docker",                     "target": "/var/lib/registry"                 }             ]         }, ... ... ...         "status": {         "timestamp": "2016-11-17t12:36:06.714513328z",         "state": "rejected",         "message": "resolving controller failed",         "err": "invalid bind mount source, source path not found: /users/user1/cd-summit/docker",         "containerstatus": {}     }, ... ... ... 

i found http://lucjuggery.com/blog/?p=753 allowed me moby vm on mac. mounts can seen inside moby, , above command works without problem, leaving registry running:

$ docker service ps registry id                         name        image     node  desired state  current state           error 7iw0jig2ysi5t7ha6422mulwc  registry.1  registry  moby  running        running 33 minutes ago  

why doesn't work native docker client, when other commands seem work?


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -