Skip to content

Add Docker support (Debian + Alpine) - #16

Open
zestyoreo wants to merge 3 commits into
mainfrom
feat/add-dockerfile
Open

zestyoreo wants to merge 3 commits into
mainfrom
feat/add-dockerfile

Conversation

@zestyoreo

@zestyoreo zestyoreo commented Sep 17, 2026

Copy link
Copy Markdown

Summary

  • Add Dockerfile: multi-stage build, compiles the release binary on rust:1-slim-bookworm and ships it on debian:bookworm-slim as a non-root user (~140MB image)
  • Add Dockerfile.alpine: musl-based multi-stage build on rust:1-alpine, ships on alpine:3 as a non-root user (~19MB image)
  • Add .dockerignore to keep the build context small (excludes target/, web/, assets/, .git, etc.)
  • Document both variants in the README with build commands, a size comparison table, and stdin-pipe / file-mount usage examples

Closes #15

Test plan

  • docker build -t ctrlb-decompose . builds successfully
  • docker build -f Dockerfile.alpine -t ctrlb-decompose . builds successfully
  • Both images verified against real log input via stdin pipe and directory mount, producing correct human/LLM/JSON output
  • Confirmed benches/ must be copied into the build stage since Cargo.toml declares a [[bench]] target that Cargo validates at manifest-parse time, even when only building --bin

Multi-stage build compiles the release binary on rust:1-slim-bookworm
and ships it on debian:bookworm-slim as a non-root user, keeping the
final image small. Document stdin-pipe and volume-mount usage in the
README.
@zestyoreo zestyoreo self-assigned this Sep 17, 2026
@zestyoreo
zestyoreo marked this pull request as draft September 17, 2026 12:24
Ship an additional musl-based image on alpine:3 alongside the
existing Debian variant, cutting image size from ~140MB to ~19MB.
Document both options in the README.
@zestyoreo zestyoreo changed the title Add Dockerfile for containerized CLI usage Add Docker support (Debian + Alpine) Sep 17, 2026
@zestyoreo
zestyoreo marked this pull request as ready for review September 17, 2026 12:34
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.

Can this be containerized?

1 participant