28 lines
571 B
Docker
28 lines
571 B
Docker
# Build stage
|
|
FROM node:22.17.0-alpine3.22 AS builder
|
|
|
|
RUN apk --update --no-cache add git python3 alpine-sdk jq curl bash
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN echo "Building mock-lockdrop-watcher" && \
|
|
yarn && yarn build
|
|
|
|
# Production stage
|
|
FROM node:22.17.0-alpine3.22
|
|
|
|
RUN apk --update --no-cache add git python3 alpine-sdk jq curl bash
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package.json yarn.lock ./
|
|
|
|
# Install only production dependencies
|
|
RUN yarn install --production --frozen-lockfile
|
|
|
|
# Copy built application from builder stage
|
|
COPY --from=builder /app/dist ./dist
|