Skip to content

Conversation

@cristi-
Copy link
Member

@cristi- cristi- commented Jan 20, 2026

Switch to gcr.io/distroless/cc-debian13 for smaller images. Ubuntu debug target available via --target debug.

Test plan

  • Built distroless and debug targets
  • Smoke tested both images

🤖 Generated with Claude Code

Use gcr.io/distroless/cc-debian13 as the default runtime (~22% smaller).
Ubuntu-based debug target available via: docker build --target debug .

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@greptile-apps
Copy link

greptile-apps bot commented Jan 20, 2026

Greptile Summary

Switches the production Docker image from ubuntu:latest to gcr.io/distroless/cc-debian13 for smaller image sizes. Adds a separate debug target that retains Ubuntu with shell access for troubleshooting.

  • Production image now uses distroless, which includes CA certificates and C runtime libraries needed by the Rust binary
  • Debug target available via docker build --target debug preserves the original Ubuntu-based image with shell access
  • Build stage unchanged, continues to use jemalloc feature

Confidence Score: 5/5

  • This PR is safe to merge - straightforward Dockerfile change with no code logic modifications
  • Simple infrastructure change that swaps base image. The distroless cc-debian13 image includes all necessary runtime dependencies (CA certificates, glibc, libgcc). Author confirmed smoke testing both targets.
  • No files require special attention

Important Files Changed

Filename Overview
Dockerfile Switched from Ubuntu to distroless cc-debian13 for smaller production images, added Ubuntu debug target for troubleshooting. No issues found.

Sequence Diagram

sequenceDiagram
    participant User as User
    participant DockerBuild as Docker Build
    participant Builder as Builder Stage
    participant Runtime as Runtime Stage

    User->>DockerBuild: docker build .
    DockerBuild->>Builder: rust:latest
    Builder->>Builder: cargo build --release
    Builder->>Builder: Copy binary from cache
    
    alt default (runtime target)
        DockerBuild->>Runtime: gcr.io/distroless/cc-debian13
        Runtime->>Runtime: Copy /app/cachey
    else --target debug
        DockerBuild->>Runtime: ubuntu:latest
        Runtime->>Runtime: apt install ca-certificates
        Runtime->>Runtime: Copy /app/cachey
    end
    
    Runtime->>User: ENTRYPOINT ["./cachey"]
Loading

- Build both runtime (distroless) and debug (ubuntu) targets
- Publish versioned and latest tags for both variants
- Push latest last so it appears at top of package page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cristi- cristi- merged commit 30b476a into main Jan 20, 2026
4 checks passed
@cristi- cristi- deleted the distroless-runtime branch January 20, 2026 16:09
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.

2 participants