mirror of
https://github.com/immich-app/discord-bot.git
synced 2026-09-30 13:32:52 +08:00
23 lines
657 B
Docker
23 lines
657 B
Docker
FROM node:24.21.0-alpine@sha256:ebfe2f90462722a7a4de65e91990e97fe0d401c70e0e762c5b53302f905ec1c1 AS build-runner
|
|
|
|
WORKDIR /app
|
|
COPY package*.json .
|
|
RUN npm ci
|
|
COPY src ./src
|
|
COPY tsconfig.json .
|
|
RUN npm run build
|
|
RUN npm prune --omit=dev
|
|
|
|
FROM node:24.21.0-alpine@sha256:ebfe2f90462722a7a4de65e91990e97fe0d401c70e0e762c5b53302f905ec1c1
|
|
|
|
RUN apk add --no-cache tini
|
|
WORKDIR /app
|
|
COPY --from=build-runner /app/node_modules /app/node_modules
|
|
COPY --from=build-runner /app/dist /app/dist
|
|
COPY package*.json .
|
|
ARG COMMIT
|
|
ENV COMMIT_SHA=${COMMIT}
|
|
USER node
|
|
ENTRYPOINT ["/sbin/tini", "--", "/bin/sh"]
|
|
CMD ["-c", "node --experimental-require-module dist/main.js "]
|