2018-02-28 22:49:59 -05:00
|
|
|
FROM node:9.5.0-alpine@sha256:50ae5f22356c5a0b0c0ea76d27a453b0baf577c61633aee25cea93dcacec1630
|
2017-05-07 10:38:53 -05:00
|
|
|
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
2016-05-09 12:19:35 -05:00
|
|
|
|
2017-07-04 11:10:41 -05:00
|
|
|
RUN apk --no-cache add openssl && \
|
|
|
|
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \
|
|
|
|
chmod +x /usr/local/bin/dumb-init && \
|
2017-12-02 09:15:12 -05:00
|
|
|
apk del openssl && \
|
|
|
|
apk --no-cache add ca-certificates wget && \
|
|
|
|
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \
|
|
|
|
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \
|
|
|
|
apk add glibc-2.25-r0.apk
|
2017-07-04 11:10:41 -05:00
|
|
|
|
2017-05-02 17:03:51 -05:00
|
|
|
ENV APPDIR /usr/local/app
|
2016-05-09 12:19:35 -05:00
|
|
|
|
2017-05-02 17:03:51 -05:00
|
|
|
WORKDIR $APPDIR
|
2017-07-04 11:10:41 -05:00
|
|
|
|
2017-05-07 10:38:53 -05:00
|
|
|
ADD . $APPDIR
|
2017-07-04 11:10:41 -05:00
|
|
|
|
2017-07-15 14:58:33 -05:00
|
|
|
ENV NODE_ENV=production
|
|
|
|
|
2017-07-18 13:53:37 -05:00
|
|
|
RUN npm config set registry http://registry.npmjs.org/ && \
|
2017-12-21 03:44:57 -05:00
|
|
|
yarn global add -s flow-bin@0.52.0 && \
|
2017-07-18 13:53:37 -05:00
|
|
|
yarn install --production=false && \
|
2017-12-02 09:15:12 -05:00
|
|
|
yarn run lint && \
|
2017-12-05 03:36:44 -05:00
|
|
|
yarn run code:build && \
|
2017-07-18 13:53:37 -05:00
|
|
|
yarn run build:webui && \
|
2017-12-18 01:27:00 -05:00
|
|
|
yarn run test:unit -- --silent true --coverage false --bail && \
|
2017-07-18 13:53:37 -05:00
|
|
|
yarn cache clean && \
|
2017-11-17 03:08:22 -05:00
|
|
|
yarn install --production=true --pure-lockfile
|
2016-05-09 12:19:35 -05:00
|
|
|
|
2017-01-14 15:51:18 -05:00
|
|
|
RUN mkdir -p /verdaccio/storage /verdaccio/conf
|
2017-07-18 13:53:37 -05:00
|
|
|
|
2016-05-09 12:19:35 -05:00
|
|
|
ADD conf/docker.yaml /verdaccio/conf/config.yaml
|
|
|
|
|
2017-07-05 09:30:31 -05:00
|
|
|
RUN addgroup -S verdaccio && adduser -S -G verdaccio verdaccio && \
|
2017-05-02 17:03:51 -05:00
|
|
|
chown -R verdaccio:verdaccio "$APPDIR" && \
|
|
|
|
chown -R verdaccio:verdaccio /verdaccio
|
2017-01-14 15:51:18 -05:00
|
|
|
|
|
|
|
USER verdaccio
|
|
|
|
|
2017-06-21 22:56:39 -05:00
|
|
|
ENV PORT 4873
|
2017-07-04 11:53:45 -05:00
|
|
|
ENV PROTOCOL http
|
|
|
|
|
2017-06-21 22:56:39 -05:00
|
|
|
EXPOSE $PORT
|
2016-05-09 12:19:35 -05:00
|
|
|
|
2017-01-14 15:51:18 -05:00
|
|
|
VOLUME ["/verdaccio"]
|
2016-05-09 12:19:35 -05:00
|
|
|
|
2017-07-04 11:10:41 -05:00
|
|
|
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
|
|
|
|
|
2017-07-04 11:53:45 -05:00
|
|
|
CMD $APPDIR/bin/verdaccio --config /verdaccio/conf/config.yaml --listen $PROTOCOL://0.0.0.0:${PORT}
|