Docker build: add metadata, clear npm cache

This commit is contained in:
Jannis R 2021-09-13 18:14:43 +02:00
parent 786072b092
commit 3fe7151017
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -1,4 +1,11 @@
FROM node:alpine as builder
LABEL org.opencontainers.image.title="db-rest"
LABEL org.opencontainers.image.description="A clean REST API wrapping around the Deutsche Bahn API."
LABEL org.opencontainers.image.authors="Jannis R <mail@jannisr.de>"
LABEL org.opencontainers.image.documentation="https://github.com/derhuerst/db-rest/tree/5"
LABEL org.opencontainers.image.source="https://github.com/derhuerst/db-rest"
LABEL org.opencontainers.image.revision="5"
LABEL org.opencontainers.image.licenses="ISC"
WORKDIR /app
# install dependencies
@ -17,7 +24,7 @@ WORKDIR /app
# install dependencies
ADD package.json /app
RUN npm install --production
RUN npm install --production && npm cache clean --force
# add source code
ADD . /app