Merge pull request #635 from bochen2014/master

add documentation for issue#336
This commit is contained in:
Juan Picado @jotadeveloper 2018-03-24 13:42:04 +01:00 committed by GitHub
commit 1455ff44f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -55,13 +55,14 @@ The above line will pull the latest prebuilt image from dockerhub, if you haven'
If you have [build an image locally](#build-your-own-docker-image) use `verdaccio` as the last argument. If you have [build an image locally](#build-your-own-docker-image) use `verdaccio` as the last argument.
You can use `-v` to mount `conf` and `storage` to the hosts filesystem: You can use `-v` to bind mount `conf` and `storage` to the hosts filesystem:
```bash ```bash
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \ V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
-v $V_PATH/conf:/verdaccio/conf \ -v $V_PATH/conf:/verdaccio/conf \
-v $V_PATH/storage:/verdaccio/storage \ -v $V_PATH/storage:/verdaccio/storage \
verdaccio/verdaccio verdaccio/verdaccio
``` ```
>Note: Verdaccio runs as a non-root user (uid=101, gid=101) inside the container, if you use bind mount to override default, you need to make sure the mount directory is assigned to the right user. In above example, you need to run `sudo chown -R 101:101 /opt/verdaccio` otherwise you will get permission errors at runtime. [Use docker volume](https://docs.docker.com/storage/volumes/) is recommended over using bind mount.
### Docker and custom port configuration ### Docker and custom port configuration
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker. Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.