feat(docker): add official Docker image#185
Open
Greite wants to merge 5 commits intoyoanbernabeu:mainfrom
Open
feat(docker): add official Docker image#185Greite wants to merge 5 commits intoyoanbernabeu:mainfrom
Greite wants to merge 5 commits intoyoanbernabeu:mainfrom
Conversation
Add Docker support with a minimal FROM scratch image (~30MB) containing only the static binary and CA certificates. Configuration is generated at startup from GREPAI_* environment variables via a new --auto-init flag on the watch command, replacing the shell-based entrypoint. - Add config.GenerateFromEnv() for env vars to config.yaml generation - Add --auto-init flag to watch command - Add Dockerfile, .dockerignore, CI workflow, and documentation - Add Docker Compose watch profile
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #185 +/- ##
===========================================
+ Coverage 27.16% 47.01% +19.84%
===========================================
Files 32 73 +41
Lines 3711 14086 +10375
===========================================
+ Hits 1008 6622 +5614
- Misses 2620 6783 +4163
- Partials 83 681 +598 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
added 3 commits
March 9, 2026 13:56
The FROM scratch image runs as user 65534 (nobody). Docker-created bind mount directories are owned by root, causing permission denied when writing .grepai/config.yaml. Pre-create dirs with chmod 777.
The container runs as uid 65534 and writes config with 0600 perms. Use chown to grant volume ownership and sudo grep to read files on the host side.
The GitHub Actions runner user needs sudo to chown files to uid 65534.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FROM scratchDocker image (~22MB) with only the static binary and CA certificates — no Alpine, no tini, no shellconfig.GenerateFromEnv()to generate.grepai/config.yamlfromGREPAI_*environment variables--auto-initflag towatchcommand to trigger env-based config generation at startupTest plan
go test -v -run TestGenerateFromEnv ./config/...— all 7 tests passmake test— full test suite passes (0 failures)make build— binary compilesdocker build -t grepai .— image builds successfullydocker images grepai— verify size ~22MBdocker run --rm --entrypoint /grepai grepai version— binary runs