1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01:00
verdaccio/Dockerfile

50 lines
1.5 KiB
Docker
Raw Normal View History

FROM node:8.9.0-alpine
LABEL maintainer="https://github.com/verdaccio/verdaccio"
2016-05-09 19:19:35 +02: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 && \
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
ENV APPDIR /usr/local/app
2016-05-09 19:19:35 +02:00
WORKDIR $APPDIR
ADD . $APPDIR
2017-07-15 21:58:33 +02:00
ENV NODE_ENV=production
RUN npm config set registry http://registry.npmjs.org/ && \
npm install -g -s --no-progress yarn@0.28.4 --pure-lockfile && \
2017-12-02 15:23:07 +01:00
npm install -g -s flow-bin@0.60.0 && \
yarn install --production=false && \
yarn run lint && \
yarn run build:webui && \
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
RUN mkdir -p /verdaccio/storage /verdaccio/conf
2016-05-09 19:19:35 +02:00
ADD conf/docker.yaml /verdaccio/conf/config.yaml
RUN addgroup -S verdaccio && adduser -S -G verdaccio verdaccio && \
chown -R verdaccio:verdaccio "$APPDIR" && \
chown -R verdaccio:verdaccio /verdaccio
USER verdaccio
ENV PORT 4873
2017-07-04 18:53:45 +02:00
ENV PROTOCOL http
EXPOSE $PORT
2016-05-09 19:19:35 +02:00
VOLUME ["/verdaccio"]
2016-05-09 19:19:35 +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}