forked from covidgreen/covid-green-push-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (27 loc) · 1.06 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
FROM node:12-alpine
# Workdir
WORKDIR contact-tracing-push
# Copy and install production packages
COPY lib lib/
COPY index.js package*.json ./
RUN npm ci --production
# Non root user
USER node
# These need to come after the dependencies so we get to use a cache when building
ARG BUILD_DATE=unspecified
ARG VCS_BRANCH=unspecified
ARG VCS_COMMIT=unspecified
ARG VCS_SHORT_COMMIT=unspecified
ARG VCS_URL=unspecified
ARG VERSION=unspecified
# See https://github.com/opencontainers/image-spec/blob/master/annotations.md
# Ack: Short revision is non standard
LABEL org.opencontainers.image.created=${BUILD_DATE}
LABEL org.opencontainers.image.ref.name=${VCS_BRANCH}
LABEL org.opencontainers.image.revision=${VCS_COMMIT}
LABEL org.opencontainers.image.shortrevision=${VCS_SHORT_COMMIT}
LABEL org.opencontainers.image.source=${VCS_URL}
LABEL org.opencontainers.image.version=${VERSION}
# Running port is configured through API_PORT env variable
ENTRYPOINT ["npm"]
CMD ["start"]