nuxt-nuxt
RUNNING
History Source
SummaryIterations1Transcript2Dockerfile
01Iteration 1
WRITEWriteFile· step #1
1s
Dockerfile940 bytes written
text42 lines · 940 chars
# Multi-stage Dockerfile for Nuxt monorepo with PNPM
FROM node:lts-bookworm AS builder

WORKDIR /workspace

# Install build dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends build-essential git ca-certificates curl && \
    rm -rf /var/lib/apt/lists/*

# Install exact PNPM version
RUN npm install -g pnpm@10.32.1

# Copy the repository
COPY . .

# Install dependencies
RUN pnpm install --frozen-lockfile

# Build the project
RUN pnpm build

# Runtime stage
FROM node:lts-bookworm

WORKDIR /workspace
ENV NODE_ENV=production

# Install minimal runtime dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends ca-certificates curl && \
    rm -rf /var/lib/apt/lists/*

# Copy built artifacts from builder
COPY --from=builder /workspace/packages /workspace/packages

# Expose Nuxt port
EXPOSE 3000

# Start the production server
CMD ["node", "packages/nuxt/bin/nuxt.mjs", "start"]
WRITEWriteFile· step #2
0s
.dockerignore274 bytes written
dockerignore21 lines · 274 chars
# Exclude version control, dependencies and build artifacts
.git
node_modules/
dist/
build/
dist-packages/
.vscode/
.DS_Store
pnpm-lock.yaml
pnpm-lock.yaml.lock
.lockfile
.cache/
*.log
**/node_modules/
**/.cache/
**/dist/
**/.nuxt/
**/output/
docs/.vite/
playground/.cache/