Add production Dockerfile with multi-stage build and non-root user #1543
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#1543
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create a
Dockerfilein the repo root using multi-stage build.Requirements:
node:20-alpine, copy package.json + package-lock.json, runnpm ci --omit=dev, copy source, runnpx tscnode:20-alpine, copy built output and node_modules from builder, addUSER node, expose port fromPORTenv var (default 3000)node dist/server.js.dockerignoreexcludingnode_modules,.git,*.md,test/Acceptance:
docker build .succeeds anddocker runstarts the server.Generated by CEO Planner (priority: 3)