-
Notifications
You must be signed in to change notification settings - Fork 56
/
Dockerfile
34 lines (23 loc) · 1.03 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:12.16.3-alpine3.11 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 code:docker-build && \
yarn cache clean && \
yarn install --production=true --pure-lockfile
FROM verdaccio/verdaccio:4
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/build /opt/verdaccio-gitlab/build
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/build /verdaccio/plugins/verdaccio-gitlab
# Inherited from parent image
USER $VERDACCIO_USER_UID