Skip to main content

apps/web/Dockerfile

Metadata

  • Purpose: Source artifact in the anchor-msp system.
  • Domain: applications
  • Language: docker
  • Bytes: 1126
  • Lines: 27
  • Content hash (short): 26d62066
  • Source (start): apps/web/Dockerfile:1
  • Source (end): apps/web/Dockerfile:27

Indexed Symbols

No indexed functions/methods detected in this file.

Markdown Headings (if applicable)

No markdown headings detected.

Source Preview

FROM node:22-alpine AS deps
WORKDIR /app
COPY package.json pnpm-workspace.yaml turbo.json tsconfig.base.json ./
COPY apps/web/package.json apps/web/package.json
COPY packages/contracts/package.json packages/contracts/package.json
COPY packages/ui/package.json packages/ui/package.json
RUN corepack enable && pnpm install --filter @anchor/web... --filter @anchor/contracts --filter @anchor/ui

FROM node:22-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN corepack enable && pnpm install --filter @anchor/web... --filter @anchor/contracts --filter @anchor/ui
RUN corepack enable && pnpm build --filter @anchor/contracts --filter @anchor/ui --filter @anchor/web

FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup -g 10001 -S anchor && adduser -S -D -H -u 10001 -G anchor anchor
COPY --from=builder /app/apps/web/.next/standalone ./
COPY --from=builder /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=builder /app/apps/web/public ./apps/web/public
RUN chown -R anchor:anchor /app
USER anchor
EXPOSE 3000