2018-08-01 22:22:35 +02:00
|
|
|
FROM node:10.7-alpine
|
2017-05-07 17:38:53 +02:00
|
|
|
LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
2016-05-09 19:19:35 +02:00
|
|
|
|
2018-07-19 10:58:29 +02:00
|
|
|
RUN apk --no-cache add wget openssl && \
|
2017-07-04 18:10:41 +02:00
|
|
|
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 15:15:12 +01:00
|
|
|
apk del openssl && \
|
|
|
|
apk --no-cache add ca-certificates wget && \
|
2018-08-01 22:22:35 +02:00
|
|
|
apk --no-cache add g++ gcc libgcc libstdc++ linux-headers make python && \
|
2017-12-02 15:15:12 +01:00
|
|
|
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 18:10:41 +02:00
|
|
|
|
2017-05-03 00:03:51 +02:00
|
|
|
ENV APPDIR /usr/local/app
|
2016-05-09 19:19:35 +02:00
|
|
|
|
2017-05-03 00:03:51 +02:00
|
|
|
WORKDIR $APPDIR
|
2017-07-04 18:10:41 +02:00
|
|
|
|
2017-05-07 17:38:53 +02:00
|
|
|
ADD . $APPDIR
|
2017-07-04 18:10:41 +02:00
|
|
|
|
2017-07-15 21:58:33 +02:00
|
|
|
ENV NODE_ENV=production
|
|
|
|
|
2017-07-18 20:53:37 +02:00
|
|
|
RUN npm config set registry http://registry.npmjs.org/ && \
|
2018-04-09 06:44:42 +02:00
|
|
|
yarn global add -s flow-bin@0.69.0 && \
|
2017-07-18 20:53:37 +02:00
|
|
|
yarn install --production=false && \
|
2018-06-30 19:23:53 +02:00
|
|
|
yarn lint && \
|
|
|
|
yarn code:docker-build && \
|
|
|
|
yarn build:webui && \
|
2017-07-18 20:53:37 +02:00
|
|
|
yarn cache clean && \
|
2017-11-17 09:08:22 +01:00
|
|
|
yarn install --production=true --pure-lockfile
|
2016-05-09 19:19:35 +02:00
|
|
|
|
2018-07-18 14:53:08 +02:00
|
|
|
RUN mkdir -p /verdaccio/storage /verdaccio/plugins /verdaccio/conf
|
2017-07-18 20:53:37 +02:00
|
|
|
|
2016-05-09 19:19:35 +02:00
|
|
|
ADD conf/docker.yaml /verdaccio/conf/config.yaml
|
|
|
|
|
2017-07-05 16:30:31 +02:00
|
|
|
RUN addgroup -S verdaccio && adduser -S -G verdaccio verdaccio && \
|
2017-05-03 00:03:51 +02:00
|
|
|
chown -R verdaccio:verdaccio "$APPDIR" && \
|
|
|
|
chown -R verdaccio:verdaccio /verdaccio
|
2017-01-14 21:51:18 +01:00
|
|
|
|
|
|
|
USER verdaccio
|
|
|
|
|
2017-06-22 05:56:39 +02:00
|
|
|
ENV PORT 4873
|
2017-07-04 18:53:45 +02:00
|
|
|
ENV PROTOCOL http
|
|
|
|
|
2017-06-22 05:56:39 +02:00
|
|
|
EXPOSE $PORT
|
2016-05-09 19:19:35 +02:00
|
|
|
|
2017-01-14 21:51:18 +01:00
|
|
|
VOLUME ["/verdaccio"]
|
2016-05-09 19:19:35 +02:00
|
|
|
|
2017-07-04 18:10:41 +02:00
|
|
|
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
|
|
|
|
|
2017-07-04 18:53:45 +02:00
|
|
|
CMD $APPDIR/bin/verdaccio --config /verdaccio/conf/config.yaml --listen $PROTOCOL://0.0.0.0:${PORT}
|