Skip to content

Conversation

jonashackt
Copy link
Contributor

As it is said in the text before "The example bind-mounts /mnt/registry on the swarm node to /var/lib/registry/ within the container." the example uses a bind-mount instead of a volume-mount (see difference here in the docs: https://docs.docker.com/engine/swarm/services/#give-a-service-access-to-volumes-or-bind-mounts). As bind-mounts are only applied with type=bind configuration parameter of --mount, it has to be added here so that the swarm-registry service is able to start.

Additionally, the bind-mount relies on the pre-existing src-directory /mnt/registry, which should also be added to the documentation - see important notes "If you bind mount a host path into your service’s containers, the path must exist on every swarm node." in https://docs.docker.com/engine/swarm/services/#give-a-service-access-to-volumes-or-bind-mounts.

Proposed changes

Updated the docs.

Related issues (optional)

moby/moby#25912
moby/moby#34532

As it is said in the text before "The example bind-mounts `/mnt/registry` on the swarm node to `/var/lib/registry/` within the container." the example uses a bind-mount instead of a volume-mount (see difference here in the docs: https://docs.docker.com/engine/swarm/services/#give-a-service-access-to-volumes-or-bind-mounts). As bind-mounts are only applied with `type=bind` configuration parameter of `--mount`, it has to be added here so that the `swarm-registry` service is able to start. Additionally, the bind-mount relies on the pre-existing src-directory `/mnt/registry`, which should also be added to the documentation - see important notes "If you bind mount a host path into your service’s containers, the path must exist on every swarm node." in https://docs.docker.com/engine/swarm/services/#give-a-service-access-to-volumes-or-bind-mounts.
jonashackt added a commit to jonashackt/ansible-windows-docker-springboot that referenced this pull request Sep 15, 2017
…/1)"-error, see docker/docs#4641 We need to configure the bind-mount in the --mount configuration parameters of docker service create command, as the docs state. Also added constraint to only replicate registry on Linux nodes and created `/mtn/registry` directory on all Linux nodes.
Copy link

@mdlinville mdlinville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve the conflict. Also, please don't abbreviate source as src when you're not talking about specific directory called src.

@jonashackt
Copy link
Contributor Author

jonashackt commented Sep 19, 2017

Resolved the conflict and changed src into source :)

@mdlinville mdlinville merged commit 4aed3df into docker:master Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants