- Simplify Dockerfiles to use single-stage pnpm install - Add openssl to server Alpine image for Prisma - Remove obsolete version from docker-compose.yml - Fix Dockerfile.node copy paths for monorepo root context - Add .dockerignore at monorepo root - Create empty public dir for Next.js standalone build Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
23 lines
780 B
Docker
23 lines
780 B
Docker
# Build image for Hardhat compilation and testing
|
|
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
RUN apk add --no-cache git
|
|
COPY apps/contracts/package.json ./
|
|
RUN npm install
|
|
COPY apps/contracts/contracts ./contracts
|
|
COPY apps/contracts/test ./test
|
|
COPY apps/contracts/hardhat.config.ts ./
|
|
COPY apps/contracts/ignition ./ignition
|
|
COPY apps/contracts/tsconfig.json ./
|
|
RUN npx hardhat compile
|
|
|
|
# Runtime image for running tests or deployment scripts
|
|
FROM node:20-alpine
|
|
WORKDIR /app
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
COPY --from=builder /app/contracts ./contracts
|
|
COPY --from=builder /app/test ./test
|
|
COPY --from=builder /app/hardhat.config.ts ./
|
|
COPY --from=builder /app/ignition ./ignition
|
|
COPY --from=builder /app/tsconfig.json ./
|
|
CMD ["npx", "hardhat", "test"]
|