sandbox-agent/frontend/packages/inspector/Dockerfile
Nathan Flurry 016024c04b feat: add release pipeline for crates.io and npm publishing
- Add --check, --publish-crates, --publish-npm-sdk, --publish-npm-cli flags to release script
- Create CI workflow with pre-release checks (cargo fmt, clippy, test, tsc)
- Update release workflow to run checks, build binaries, and publish packages
- Add @sandbox-agent/cli npm package with platform-specific binaries (esbuild pattern)
- Configure TypeScript SDK for npm publishing (exports, files, types)
- Add crates.io metadata to Cargo.toml (repository, description)
- Rename @sandbox-agent/web to @sandbox-agent/inspector
2026-01-25 14:11:39 -08:00

34 lines
945 B
Docker

FROM node:22-alpine AS build
WORKDIR /app
RUN npm install -g pnpm
# Copy package files for all workspaces
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY frontend/packages/inspector/package.json ./frontend/packages/inspector/
COPY sdks/typescript/package.json ./sdks/typescript/
# Install dependencies
RUN pnpm install --filter @sandbox-agent/inspector...
# Copy SDK source (with pre-generated types)
COPY sdks/typescript ./sdks/typescript
# Build SDK (just tsc, skip generate since types are pre-generated)
RUN cd sdks/typescript && pnpm exec tsc -p tsconfig.json
# Copy inspector source
COPY frontend/packages/inspector ./frontend/packages/inspector
# Build inspector
RUN cd frontend/packages/inspector && pnpm exec vite build
FROM caddy:alpine
COPY --from=build /app/frontend/packages/inspector/dist /srv
RUN cat > /etc/caddy/Caddyfile <<'EOF'
:80 {
root * /srv
file_server
try_files {path} /index.html
}
EOF
EXPOSE 80