fix default secrets path in container (#4011)

This commit is contained in:
Vega Chou 2017-08-02 03:03:05 +08:00 committed by Misty Stanley-Jones
parent 3c1aeebc2a
commit c2bbc7eab7

View file

@ -311,7 +311,7 @@ you are also specifying that only a single replica should run at a time. The
example bind-mounts `/mnt/registry` on the swarm node to `/var/lib/registry/` example bind-mounts `/mnt/registry` on the swarm node to `/var/lib/registry/`
within the container. within the container.
By default, secrets are mounted into a service at `/run/<secret-name>`. By default, secrets are mounted into a service at `/run/secrets/<secret-name>`.
```bash ```bash
$ docker service create \ $ docker service create \
@ -321,8 +321,8 @@ $ docker service create \
--label registry=true \ --label registry=true \
-v /mnt/registry:/var/lib/registry \ -v /mnt/registry:/var/lib/registry \
-e REGISTRY_HTTP_ADDR=0.0.0.0:80 \ -e REGISTRY_HTTP_ADDR=0.0.0.0:80 \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/run/domain.crt \ -e REGISTRY_HTTP_TLS_CERTIFICATE=/run/secrets/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/run/domain.key \ -e REGISTRY_HTTP_TLS_KEY=/run/secrets/domain.key \
-p 80:80 \ -p 80:80 \
--replicas 1 \ --replicas 1 \
registry:2 registry:2