2017-01-14 12:51:18 -08:00
|
|
|
FROM node:alpine
|
2016-05-09 14:19:35 -03:00
|
|
|
|
2017-01-14 12:51:18 -08:00
|
|
|
ENV appdir /usr/local/app
|
2016-05-09 14:19:35 -03:00
|
|
|
|
2017-01-14 12:51:18 -08:00
|
|
|
RUN mkdir -p $appdir
|
|
|
|
WORKDIR $appdir
|
|
|
|
COPY . $appdir
|
|
|
|
RUN npm install
|
2016-05-09 14:19:35 -03:00
|
|
|
|
2017-01-14 12:51:18 -08:00
|
|
|
RUN mkdir -p /verdaccio/storage /verdaccio/conf
|
2016-05-09 14:19:35 -03:00
|
|
|
ADD conf/docker.yaml /verdaccio/conf/config.yaml
|
|
|
|
|
2017-01-14 12:51:18 -08:00
|
|
|
RUN addgroup -S verdaccio && adduser -S -g verdaccio verdaccio && \
|
|
|
|
chown -R verdaccio:verdaccio $appdir && \
|
|
|
|
chown -R verdaccio:verdaccio /verdaccio
|
|
|
|
|
|
|
|
USER verdaccio
|
|
|
|
|
2016-05-09 14:19:35 -03:00
|
|
|
EXPOSE 4873
|
|
|
|
|
2017-01-14 12:51:18 -08:00
|
|
|
VOLUME ["/verdaccio"]
|
2016-05-09 14:19:35 -03:00
|
|
|
|
2017-01-14 12:51:18 -08:00
|
|
|
CMD ["sh", "-c", "${appdir}/bin/verdaccio --config /verdaccio/conf/config.yaml --listen 0.0.0.0:4873"]
|