You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
542 B

# syntax=docker/dockerfile:1
FROM node:22-alpine AS builder
ARG IMAGE_API_VERSION
RUN npm install -g pnpm
RUN apk add git
RUN git clone https://gitea.anomalistdesign.com/log-trade/image-api.git
WORKDIR image-api
RUN git checkout $IMAGE_API_VERSION
# dev dependencies like TypeScript are needed to build
RUN pnpm install
RUN pnpm build
RUN pnpm install --prod
FROM node:22-alpine
COPY --from=builder /image-api/dist /image-api/dist
COPY --from=builder /image-api/node_modules /image-api/node_modules
WORKDIR image-api
CMD node dist/server.js