Skip to content

feat: add Dockerfile and .dockerignore for container deployments#5

Open
jtalborough wants to merge 3 commits intoRelayPlane:mainfrom
jtalborough:feat/containerization
Open

feat: add Dockerfile and .dockerignore for container deployments#5
jtalborough wants to merge 3 commits intoRelayPlane:mainfrom
jtalborough:feat/containerization

Conversation

@jtalborough
Copy link

Summary

  • Adds multi-stage Dockerfile for building and running the proxy in containers
  • Adds .dockerignore to minimize build context
  • Uses existing node user (UID 1000) for non-root execution
  • Sets container defaults: port 4801, host 0.0.0.0 via env vars

Changes

  • Dockerfile (new): Multi-stage build (builder + runtime), conditional npm ci/npm install for lockfile flexibility
  • .dockerignore (new): Excludes node_modules, dist, .git, tests, config files

Dockerfile details

Test plan

  • docker build -t relayplane-proxy . succeeds
  • docker run -e ANTHROPIC_API_KEY=... -p 4801:4801 relayplane-proxy starts and /health responds
  • Runs as non-root (UID 1000)
  • Build context is minimal (~50KB without node_modules/dist)

Dependencies

Multi-stage build: builder stage compiles TypeScript, runtime stage has
only production dependencies. Non-root user (UID 1000) for K8s
securityContext compatibility.

Default port 4801 and host 0.0.0.0 set via env vars (requires the
RELAYPLANE_PROXY_PORT/HOST support from the cli-env-vars PR).
node:18-alpine already has a node user/group at UID/GID 1000.
Fall back to npm install when no lockfile is present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant