docker-ddns-cloudflare/Dockerfile

24 lines
364 B
Docker
Raw Normal View History

2023-06-24 14:19:36 +00:00
FROM node:20-alpine as base
2023-08-20 20:37:36 +00:00
# PNPM
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
# Setup
ENV CI=true
2020-07-23 10:52:07 +00:00
WORKDIR /app
2023-08-20 20:37:36 +00:00
ADD ./package.json ./pnpm-lock.yaml ./
2019-01-22 11:37:36 +00:00
2022-02-07 12:14:23 +00:00
2022-10-20 13:18:57 +00:00
FROM base as builder
2023-08-20 20:37:36 +00:00
RUN pnpm install
2021-10-22 15:47:49 +00:00
ADD . .
2022-10-20 13:18:57 +00:00
RUN pnpm run build
2022-02-07 12:14:23 +00:00
2022-10-20 13:18:57 +00:00
FROM base
2023-08-20 20:37:36 +00:00
RUN pnpm install --prod
2022-02-07 12:14:23 +00:00
COPY --from=builder /app/dist/ /app/dist/
STOPSIGNAL SIGTERM
2019-01-22 11:37:36 +00:00
2022-10-20 13:18:57 +00:00
CMD ["pnpm", "start"]