mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
Add Dockerfile to build docker image
This commit is contained in:
parent
86b9f512a5
commit
cca5196752
3 changed files with 74 additions and 1 deletions
16
Dockerfile
Normal file
16
Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
|||
FROM node:6.1.0-onbuild
|
||||
|
||||
RUN adduser --disabled-password --gecos "" verdaccio && \
|
||||
mkdir -p /verdaccio/storage /verdaccio/conf && \
|
||||
chown -R verdaccio.verdaccio /verdaccio
|
||||
|
||||
USER verdaccio
|
||||
WORKDIR /verdaccio
|
||||
|
||||
ADD conf/docker.yaml /verdaccio/conf/config.yaml
|
||||
|
||||
EXPOSE 4873
|
||||
|
||||
VOLUME ["/verdaccio/conf", "/verdaccio/storage"]
|
||||
|
||||
CMD ["/usr/src/app/bin/sinopia", "--config", "/verdaccio/conf/config.yaml", "--listen", "0.0.0.0:4873"]
|
10
README.md
10
README.md
|
@ -49,7 +49,15 @@ Now you can navigate to [http://localhost:4873/](http://localhost:4873/) where y
|
|||
|
||||
### Docker
|
||||
|
||||
A Sinopia docker image [is available](https://registry.hub.docker.com/u/keyvanfatehi/sinopia/)
|
||||
`docker build -t verdaccio .`
|
||||
|
||||
```
|
||||
docker run -it --rm --name verdaccio -p 4873:4873 \
|
||||
-v /<path to verdaccio directory>/conf:/verdaccio/conf \
|
||||
-v /<path to verdaccio directory>/storage:/verdaccio/storage \
|
||||
-v /<path to verdaccio directory>/local_storage:/verdaccio/local_storage \
|
||||
verdaccio
|
||||
```
|
||||
|
||||
### Chef
|
||||
|
||||
|
|
49
conf/docker.yaml
Normal file
49
conf/docker.yaml
Normal file
|
@ -0,0 +1,49 @@
|
|||
#
|
||||
# This is the default config file. It allows all users to do anything,
|
||||
# so don't use it on production systems.
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/rlidwka/sinopia/tree/master/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
storage: /verdaccio/storage
|
||||
|
||||
auth:
|
||||
htpasswd:
|
||||
file: /verdaccio/config/htpasswd
|
||||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
|
||||
# a list of other known repositories we can talk to
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
|
||||
packages:
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $all
|
||||
|
||||
'*':
|
||||
# allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
#
|
||||
# you can specify usernames/groupnames (depending on your auth plugin)
|
||||
# and three keywords: "$all", "$anonymous", "$authenticated"
|
||||
access: $all
|
||||
|
||||
# allow all known users to publish packages
|
||||
# (anyone can register by default, remember?)
|
||||
publish: $all
|
||||
|
||||
# if package is not available locally, proxy requests to 'npmjs' registry
|
||||
proxy: npmjs
|
||||
|
||||
# log settings
|
||||
logs:
|
||||
- {type: stdout, format: pretty, level: http}
|
||||
#- {type: file, path: sinopia.log, level: info}
|
||||
|
Loading…
Reference in a new issue