forked from timoa/app-stores-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (30 loc) · 1.08 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
35
36
37
ARG nodeVersion=12.16.1
FROM node:${nodeVersion}-alpine
ARG appPort=9514
LABEL maintainer="Damien Laureaux <[email protected]>" \
org.label-schema.vendor="Timoa" \
org.label-schema.name="App stores Prometheus Exporter" \
org.label-schema.description="App stores Prometheus Exporter" \
org.label-schema.url="https://timoa.com" \
org.label-schema.vcs-url="https://github.com/timoa/app-stores-prometheus-exporter" \
org.label-schema.version=latest \
org.label-schema.schema-version="1.0"
RUN \
apk --no-cache update && \
apk --no-cache upgrade && \
apk add --no-cache ca-certificates && update-ca-certificates && \
rm -rf /var/cache/apk/* && \
npm install -g npm@latest && \
mkdir -p /opt/app && \
adduser -S app-user
WORKDIR /opt/app/
COPY ./ /opt/app/
HEALTHCHECK --interval=15s --timeout=5s --start-period=30s \
CMD npm run docker:status
RUN \
npm install --production --unsafe-perm && \
npm cache clean --force
RUN chown -R app-user /opt/app
USER app-user
EXPOSE ${appPort}
CMD [ "npm", "start" ]