SponsorBlockServer/Dockerfile
Peter Dave Hello f1005fe779
Leave no apk cache in the Docker image
This will make the Docker image tidier
2022-10-23 20:19:06 +08:00

16 lines
481 B
Docker

FROM node:16-alpine as builder
RUN apk add --no-cache --virtual .build-deps python3 make g++
COPY package.json package-lock.json tsconfig.json entrypoint.sh ./
COPY src src
RUN npm ci && npm run tsc
FROM node:16-alpine as app
WORKDIR /usr/src/app
RUN apk add --no-cache git postgresql-client
COPY --from=builder ./node_modules ./node_modules
COPY --from=builder ./dist ./dist
COPY ./.git ./.git
COPY entrypoint.sh .
COPY databases/*.sql databases/
EXPOSE 8080
CMD ./entrypoint.sh