anomalyco-opencode
SUCCESS
3m 39s
History Source
SummaryIterations1Transcript3Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile1066 bytes written
text41 lines · 1066 chars
# Builder stage: install dependencies and build the monorepo using Bun
FROM node:lts-bookworm AS builder

WORKDIR /workspace

# Install system dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
  && apt-get install -y curl ca-certificates git build-essential python3 \
  && rm -rf /var/lib/apt/lists/*

# Copy repository (best effort for caching; the CI-like environment will have the full repo)
COPY . .

# Install Bun and dependencies
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"

# Install workspace dependencies
RUN bun install

# Typecheck the entire monorepo and build the app package
RUN bun turbo typecheck
RUN bun --cwd packages/app build

# Runtime stage: serve the built static site
FROM node:lts-bookworm

WORKDIR /app

# Copy the built assets from the builder stage
COPY --from=builder /workspace/packages/app/dist ./dist

# Install a tiny static file server to serve the built assets
RUN npm i -g serve

EXPOSE 8080

# Serve the prebuilt app on port 8080
CMD ["serve", "-s", "dist", "-l", "8080"]
WRITEWriteFile· step #2
0s
.dockerignore77 bytes written
dockerignore10 lines · 77 chars
node_modules
dist
.build
.target
.vscode
.git
bun.lock
bunfig.toml
.DS_Store
VERIFYVerifyBuild· step #3
1m 55s
VerifyBuildaccepted
Smoke [PASS]: test -f /app/dist/index.html
Smoke [PASS]: command -v serve >/dev/null 2>&1