-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile-api
34 lines (28 loc) · 1.1 KB
/
Dockerfile-api
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-alpine
# Workdir
WORKDIR interop
# Copy and install production packages
COPY lib lib/
COPY migrations migrations/
COPY .nodemonrc 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"]