Merge Request: Add Docker Support and German Localization#35
Conversation
- Add `.dockerignore` for excluding unnecessary files during the Docker build. - Introduce multi-stage `Dockerfile` for building and running Brief with JDK 25. - Add `docker-setup.sh` script for building Docker images with Gradle. - Add Docker-specific README files (`docker/README.md`, `docker/README_de.md`) with usage instructions. - Update main `README.md` to include Docker usage guidelines.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a multi-stage Docker build (builder + runtime), a ChangesDocker Support and Bilingual Documentation
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
docker/Dockerfile (2)
28-28: 💤 Low valueWildcard JAR pattern may be fragile.
Using
brief-*-all.jarassumes a single JAR will match. If the shadowJar task produces multiple artifacts or the naming changes, this step could fail or copy the wrong file.Consider using the exact artifact name if it's predictable, or add a comment documenting the expected pattern. This would make the build more explicit and easier to debug.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docker/Dockerfile` at line 28, The COPY step uses a fragile wildcard "brief-*-all.jar" which can match multiple or unexpected artifacts; update the Dockerfile COPY instruction to reference the exact artifact name produced by the build (the shadow/jar task output) or explicitly document the expected filename pattern, and if the artifact name can vary derive or set a deterministic output name from the build (e.g., shadowJar or assemble configuration) so COPY --from=builder /app/build/libs/<exact-artifact-name>.jar /app/brief.jar will always select the correct JAR.
14-14: 💤 Low valueConsider clarifying or removing the
|| truefallback.The
|| trueensures the build continues even if dependency pre-downloading fails. While this won't break the build (dependencies will be fetched again duringshadowJar), it could mask configuration issues or network problems during layer caching.If intentional, a comment explaining why failures are acceptable would help future maintainers. If not needed, removing
|| truewould surface issues earlier.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docker/Dockerfile` at line 14, The RUN step in the Dockerfile currently suppresses failures with "|| true" for "./gradlew dependencies --no-daemon", which can mask real configuration or network errors; update this by either removing "|| true" so the build fails fast and surfaces dependency-download issues, or if the fallback is intentional (to keep cacheable layers when offline), replace the silent suppression with an explicit explanatory comment next to the RUN line clarifying why failures are acceptable and under what conditions (e.g., network flakiness or reliance on later shadowJar fetch); edit the Dockerfile RUN "./gradlew dependencies --no-daemon" line and either remove the boolean OR fallback or add the comment to document the intent.docker/docker-setup.sh (1)
13-19: 💤 Low valueDocumentation consistency: script output differs from README instructions.
The script's success message (lines 16 and 19) shows two different ways to run the container:
- Line 16: mounting config directory (matches README.md ✓)
- Line 19: passing
OPENAI_API_KEYvia-eflag (differs from README.md's--env-fileapproach)While the
-eapproach is valid, the README.md consistently documents using--env-file ~/.config/brief/.env. Consider updating line 19 to match the README for consistency, or keep both examples but add a note explaining the two options.Also, the script is written in German while the primary codebase documentation is in English. Since this PR adds German localization, this might be intentional—just noting it in case you'd like to provide an English version or add comments explaining the bilingual approach.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docker/docker-setup.sh` around lines 13 - 19, Update the second example echo that currently shows "docker run -it --rm -e OPENAI_API_KEY=\$OPENAI_API_KEY brief" to match README's usage by replacing it with the --env-file variant ("docker run -it --rm --env-file ~/.config/brief/.env brief"), or alternatively include both examples and a short parenthetical note explaining the difference; also add a brief comment in the script header indicating that this file is a German-localized message to clarify bilingual intent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docker/Dockerfile`:
- Around line 1-34: The Dockerfile currently runs the container as root; create
a non-root user and set USER so the image runs unprivileged: add steps after
WORKDIR /app to create a dedicated user (e.g., brief), set HOME (e.g.,
/home/brief), chown /app and any config directories to that user, and switch to
that user before ENTRYPOINT; ensure the COPY --from=builder artifacts and any
runtime-created config paths are writable by that user, update ENV or
application references from /root/.config/brief to the new home-based path
(/home/brief/.config/brief), and update docs/tests accordingly so the app can
read/write config under the non-root user's home.
---
Nitpick comments:
In `@docker/docker-setup.sh`:
- Around line 13-19: Update the second example echo that currently shows "docker
run -it --rm -e OPENAI_API_KEY=\$OPENAI_API_KEY brief" to match README's usage
by replacing it with the --env-file variant ("docker run -it --rm --env-file
~/.config/brief/.env brief"), or alternatively include both examples and a short
parenthetical note explaining the difference; also add a brief comment in the
script header indicating that this file is a German-localized message to clarify
bilingual intent.
In `@docker/Dockerfile`:
- Line 28: The COPY step uses a fragile wildcard "brief-*-all.jar" which can
match multiple or unexpected artifacts; update the Dockerfile COPY instruction
to reference the exact artifact name produced by the build (the shadow/jar task
output) or explicitly document the expected filename pattern, and if the
artifact name can vary derive or set a deterministic output name from the build
(e.g., shadowJar or assemble configuration) so COPY --from=builder
/app/build/libs/<exact-artifact-name>.jar /app/brief.jar will always select the
correct JAR.
- Line 14: The RUN step in the Dockerfile currently suppresses failures with "||
true" for "./gradlew dependencies --no-daemon", which can mask real
configuration or network errors; update this by either removing "|| true" so the
build fails fast and surfaces dependency-download issues, or if the fallback is
intentional (to keep cacheable layers when offline), replace the silent
suppression with an explicit explanatory comment next to the RUN line clarifying
why failures are acceptable and under what conditions (e.g., network flakiness
or reliance on later shadowJar fetch); edit the Dockerfile RUN "./gradlew
dependencies --no-daemon" line and either remove the boolean OR fallback or add
the comment to document the intent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2b17064e-4f69-460c-b36d-f0a825e0f207
📒 Files selected for processing (7)
.dockerignoreREADME.mdREADME_de.mddocker/Dockerfiledocker/README.mddocker/README_de.mddocker/docker-setup.sh
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
- Updated Dockerfile to create a dedicated 'brief' user and set it as the default USER. - Adjusted container-side configuration paths from '/root/.config/brief' to '/home/brief/.config/brief'. - Updated README.md, README_de.md, and docker/ READMEs with the new volume mount instructions. - Synchronized example commands in docker-setup.sh with the unprivileged user's home directory. - Addresses Trivy DS-0002 (Least Privilege principle).
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docker/README_de.md`:
- Line 1: Change the German README header string "# Brief Docker Setup" to a
German heading for consistency by replacing it with "# Brief Docker‑Einrichtung"
(locate the header line "# Brief Docker Setup" in docker/README_de.md and update
the text accordingly).
In `@README_de.md`:
- Around line 53-57: Die Anleitung in README_de.md schreibt derzeit vor, den
API-Key per echo in die Shell zu schreiben (die Zeile mit echo
"OPENAI_API_KEY=dein_key_hier" > ~/.config/brief/.env), was die Eingabe in der
Shell-History hinterlässt; bitte diese Zeile ersetzen durch eine sicherere
Variante: erst mkdir -p ~/.config/brief und dann die Datei mit dem Nutzereditor
öffnen (${EDITOR:-vi} ~/.config/brief/.env) und den Eintrag
OPENAI_API_KEY=dein_key_hier dort speichern; passe die Beispielanweisungen und
die erklärende Beschreibung entsprechend an, damit Nutzer wissen, die Datei im
Editor zu befüllen und zu speichern statt den Key per echo einzufügen.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b400cddb-2b80-4679-8314-53394482b75d
📒 Files selected for processing (6)
README.mdREADME_de.mddocker/Dockerfiledocker/README.mddocker/README_de.mddocker/docker-setup.sh
✅ Files skipped from review due to trivial changes (2)
- docker/README.md
- README.md
🚧 Files skipped from review as they are similar to previous changes (2)
- docker/Dockerfile
- docker/docker-setup.sh
- Replaced insecure 'echo' redirection for API keys with interactive editor usage. - Prevents sensitive credentials from being leaked into shell history. - Updated both README.md and README_de.md for consistency. - Standardized directory creation with 'mkdir -p' before editing.
|
I tried the app in a Docker environment, but it couldn't communicate with the OpenAI API. I don't get any response to any input. I can't say for sure that the problem is related to the Docker environment—I still need to try the app with a regular installation. UPDATE 20.05.2026 it works - I forgot to set a model in .env |
Summary
This Merge Request introduces full Docker support for Brief, enabling users to build and run the application in an isolated environment without requiring a local Java installation. Additionally, it provides a complete German translation of the project documentation and several improvements to the configuration guide.
Changes
1. Docker Integration
2. Localization (German)
3. Documentation & UX Improvements
AI Disclosure
These changes were developed with the assistance of the Junie AI Agent.Greptile Summary
This PR adds full Docker support via a multi-stage
eclipse-temurin:25Dockerfile and a helperdocker-setup.shscript, and introduces a complete German translation of the project and Docker documentation.briefuser withTERM=xterm-256colorand--enable-native-access=ALL-UNNAMEDfor JLine/TUI compatibility.README_de.md,docker/README_de.md, and language-switcher links are added across all docs; content is consistent with the English originals..envfile workflow and an optional shell alias so the Dockerised binary feels like a local install.Confidence Score: 5/5
Safe to merge — changes are additive (Docker infrastructure and German docs) with no modifications to application logic.
All changes are infrastructure and documentation additions. The Dockerfile is functionally correct: non-root user, multi-stage build, explicit JAR path, and the correct JVM flags for JLine/TUI. No application code is touched.
No files require special attention.
Important Files Changed
Sequence Diagram
sequenceDiagram participant User participant Script as docker-setup.sh participant Docker participant Builder as Stage 1: eclipse-temurin:25-jdk (builder) participant Runtime as Stage 2: eclipse-temurin:25-jre User->>Script: ./docker/docker-setup.sh Script->>Docker: docker build -t brief -f docker/Dockerfile . Docker->>Builder: COPY gradlew, gradle/, build.gradle.kts, settings, properties Builder->>Builder: RUN ./gradlew dependencies (cache warm-up) Builder->>Builder: COPY src/ Builder->>Builder: RUN ./gradlew shadowJar Docker->>Runtime: "COPY --from=builder brief-*-all.jar /app/brief.jar" Runtime->>Runtime: useradd brief, chown, ENV TERM/HOME, USER brief Docker-->>Script: Image 'brief' ready Script-->>User: Print usage instructions User->>Docker: docker run -it --rm --env-file ~/.config/brief/.env -v ~/.config/brief:/home/brief/.config/brief brief Docker->>Runtime: "java --enable-native-access=ALL-UNNAMED -jar /app/brief.jar" Runtime-->>User: TUI launched in terminalPrompt To Fix All With AI
Reviews (4): Last reviewed commit: "docs: use secure editor-based API key se..." | Re-trigger Greptile