Skip to content

feat(api): multi-stage Dockerfile for gRPC API crate#29

Open
Depo-dev wants to merge 4 commits into
devfrom
feat/issue-13-grpc-api-dockerfile
Open

feat(api): multi-stage Dockerfile for gRPC API crate#29
Depo-dev wants to merge 4 commits into
devfrom
feat/issue-13-grpc-api-dockerfile

Conversation

@Depo-dev

@Depo-dev Depo-dev commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Multi-stage Dockerfile at crates/api/Dockerfile: rust:1.78-slim builder (with protoc for tonic-build) + debian:bookworm-slim runtime
  • Dependency layer cached separately; proto/ and source copied after the dummy-source dep build
  • Binary runs as non-root trident user, exposes port 50051
  • Extends CI docker-build job to also build trident-api:ci

Test plan

  • docker build -f crates/api/Dockerfile . succeeds locally
  • Final image < 100 MB
  • CI docker-build job passes on this PR

Closes #13

Depo-dev added 4 commits June 3, 2026 15:46
…ild job

Multi-stage build: rust:1.78-slim builder installs protoc, compiles
trident-api in release mode with dependency caching; debian:bookworm-slim
runtime copies only the binary and runs as non-root trident user on
port 50051. Extends the CI docker-build job to also build the gRPC API
image using GitHub Actions layer cache.
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