forked from bufferoverflow/verdaccio-gitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (23 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:10-alpine as builder
WORKDIR /opt/verdaccio-gitlab-build
COPY . .
ENV NODE_ENV=production \
VERDACCIO_BUILD_REGISTRY=https://registry.npmjs.org/
RUN yarn config set registry $VERDACCIO_BUILD_REGISTRY && \
yarn install --production=false && \
yarn build && \
yarn cache clean && \
yarn install --production=true --pure-lockfile
FROM verdaccio/verdaccio:4.x-next
LABEL maintainer="https://github.com/bufferoverflow/verdaccio-gitlab"
# Go back to root to be able to install the plugin
USER root
COPY --from=builder /opt/verdaccio-gitlab-build/lib /opt/verdaccio-gitlab/lib
COPY --from=builder /opt/verdaccio-gitlab-build/package.json /opt/verdaccio-gitlab/package.json
COPY --from=builder /opt/verdaccio-gitlab-build/node_modules /opt/verdaccio-gitlab/node_modules
ADD conf/docker.yaml /verdaccio/conf/config.yaml
# Inherited from parent image
WORKDIR $VERDACCIO_APPDIR
RUN ln -s /opt/verdaccio-gitlab/lib /verdaccio/plugins/verdaccio-gitlab
# Inherited from parent image
USER $VERDACCIO_USER_UID