Skip to content

feat(cli): add Docker image with alpine and debian variants - #8001

Merged
sid-bruno merged 5 commits into
usebruno:mainfrom
sundram-bruno:feature/docker-cli-image
May 14, 2026
Merged

sid-bruno merged 5 commits into
usebruno:mainfrom
sundram-bruno:feature/docker-cli-image

Conversation

@sundram-bruno

@sundram-bruno sundram-bruno commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

JIRA : https://usebruno.atlassian.net/browse/BRU-1220
Adds the official Docker image assets for Bruno CLI — alpine and debian variants — along with smoke tests and Docker Hub overview README.

Notable image properties:

  • Two variants — alpine (musl, smallest) and debian (glibc, for native modules / SSL edge cases)
  • Multi-arch ready (linux/amd64 + linux/arm64)
  • Non-root by default (USER node, UID 1000)
  • Pinned CLI version via BRUNO_VERSION build-arg with semver validation
  • Full OCI labels (org.opencontainers.image.source, description, licenses, title, version, url, documentation) — auto-links GHCR package back to this repo
image

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • [] I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • [] Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • New Features

    • Official Bruno CLI Docker images (Alpine & Debian) with version-pinning, tag conventions, environment defaults, and cli entrypoint.
  • Documentation

    • Comprehensive Docker guides: variant selection, tag naming, build/run examples, env injection, output formats, and CI examples.
  • Quality & Tests

    • Smoke-test script to validate image behavior: version, non-root user, working directory, help, and basic end-to-end run checks.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Alpine and Debian Dockerfiles and variant/top-level READMEs documenting tags and usage, plus a smoke-test shell script that validates image runtime behavior and optionally runs a mounted collection.

Changes

Bruno CLI Docker Infrastructure

Layer / File(s) Summary
Alpine and Debian Dockerfile definitions
packages/bruno-cli/docker/images/alpine/Dockerfile, packages/bruno-cli/docker/images/debian/Dockerfile
Alpine (node:22-alpine) and Debian (node:22-slim) Dockerfiles add BRUNO_VERSION build-arg→ENV, locale vars, OCI labels, optional semver validation, optional version-pinned npm install -g @usebruno/cli``, WORKDIR /bruno, `USER node`, and `ENTRYPOINT ["bru"]`.
Top-level and variant READMEs
packages/bruno-cli/docker/README.md, packages/bruno-cli/docker/images/alpine/README.md, packages/bruno-cli/docker/images/debian/README.md
Main README documents repository layout, registries, tag naming, pull/pin workflow, running collections with /bruno mounts, env/vars, JSON/JUnit outputs, CI examples (GitHub Actions/GitLab CI), shared image properties, and a version×variant tag matrix. Variant READMEs show base-image-specific build/run examples.
Docker image smoke-test script
packages/bruno-cli/docker/smoke-test.sh
Shell script performs checks: bru --version non-empty, container whoami is node, pwd is /bruno, bru --help succeeds, and optional bru run of a mounted collection with summary parsing and GitHub Actions warnings for partial failures.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

size/L

Suggested reviewers

  • lohit-bruno
  • naman-bruno
  • bijin-bruno

Poem

🐳 Two Dockerfiles set sail in Node's light,
Alpine swift, Debian steady and right.
Docs chart the tags and CI plots the course,
Smoke tests hum while containers run their course.
bru wakes, reports, and sleeps without a fight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding Docker images for Bruno CLI with Alpine and Debian variants, which is the primary focus of this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 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 `@packages/bruno-cli/docker/images/alpine/Dockerfile`:
- Around line 21-26: The semver check in the RUN block using BRUNO_VERSION is
flawed because it uses `[ ! $(echo ... ) ]` which yields `[ ! ]` when grep
returns empty; replace that test with a proper exit-status check such as piping
BRUNO_VERSION into grep -qE and negating its result (e.g., `if ! echo
"$BRUNO_VERSION" | grep -qE "^[0-9]+\.[0-9]+\.[0-9]+$"; then ... fi`) or use `if
[ -n "$BRUNO_VERSION" ] && ! echo "$BRUNO_VERSION" | grep -qE
"^[0-9]+\.[0-9]+\.[0-9]+$"; then` so valid semver strings do not incorrectly
fail.

In `@packages/bruno-cli/docker/images/debian/Dockerfile`:
- Around line 21-26: The semver check fails because the current test uses
command substitution and `[ ! $(...) ]`, which breaks when grep returns empty;
update the RUN block that validates BRUNO_VERSION to test grep's exit status
instead of command substitution — i.e., echo the quoted BRUNO_VERSION and run
grep with the -qE option, negating that grep result to trigger the error path if
no match; ensure BRUNO_VERSION is properly quoted in the check and keep the same
error message and exit behavior when the semver is invalid.

In `@packages/bruno-cli/docker/smoke-test.sh`:
- Around line 77-88: The docker run invocation currently injects ENV_FLAG via an
unquoted expansion which relies on word splitting and will break if
COLLECTION_ENV contains spaces or special chars; change the call that sets and
uses ENV_FLAG (and where OUTPUT is assigned) to either quote the expansion (use
"$ENV_FLAG") or, better, avoid a combined string by conditionally appending the
env option as separate args (e.g., only add --env and its value when
COLLECTION_ENV is set) so that the docker run command receives two distinct,
safely-quoted arguments; update the logic around ENV_FLAG, COLLECTION_ENV, and
the OUTPUT=$(docker run ...) line accordingly.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9d2b031b-44e2-45d2-be7a-e68b96c3b3dd

📥 Commits

Reviewing files that changed from the base of the PR and between d79aabb and aae228a.

📒 Files selected for processing (6)
  • packages/bruno-cli/docker/README.md
  • packages/bruno-cli/docker/images/alpine/Dockerfile
  • packages/bruno-cli/docker/images/alpine/README.md
  • packages/bruno-cli/docker/images/debian/Dockerfile
  • packages/bruno-cli/docker/images/debian/README.md
  • packages/bruno-cli/docker/smoke-test.sh

Comment thread packages/bruno-cli/docker/smoke-test.sh Resolved
@sundram-bruno
sundram-bruno force-pushed the feature/docker-cli-image branch from aae228a to d3910ac Compare May 14, 2026 12:49
@sundram-bruno
sundram-bruno force-pushed the feature/docker-cli-image branch from d3910ac to df8c4b4 Compare May 14, 2026 12:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@packages/bruno-cli/docker/README.md`:
- Around line 93-99: Update the docker run examples in the README to include
Windows-safe mount syntax or an explicit platform note: replace or augment uses
of $(pwd) in the example commands shown (the three run examples and the other
mentioned ranges) with PowerShell/CMD equivalents (e.g., ${PWD} or
%cd%/converted path) or add a short line explaining cross-platform usage and
showing both POSIX and Windows forms so users running the CLI from
PowerShell/CMD get a working mount; reference the existing docker run examples
in the file when applying the change.

In `@packages/bruno-cli/docker/smoke-test.sh`:
- Around line 102-113: The legacy summary parsing fails because SUMMARY_REQ
contains "Passed: <n>" / "Failed: <n>" but the extraction uses patterns that
only match "<n> Passed" / "<n> Failed"; update the PASSED and FAILED extraction
to accept both formats (colon or space) by changing the grep/regex used in the
PASSED and FAILED assignments (symbols: SUMMARY_REQ, PASSED, FAILED) to match
either "Passed: <n>" or "<n> Passed" and similarly for "Failed" (e.g. use a
single -oE pattern that captures digits before or after the word and then
extract the digits), and keep the existing fallback defaults PASSED=${PASSED:-0}
and FAILED=${FAILED:-0}.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12ddfb48-2884-4cac-9a0e-fc5e0d681203

📥 Commits

Reviewing files that changed from the base of the PR and between aae228a and d3910ac.

📒 Files selected for processing (6)
  • packages/bruno-cli/docker/README.md
  • packages/bruno-cli/docker/images/alpine/Dockerfile
  • packages/bruno-cli/docker/images/alpine/README.md
  • packages/bruno-cli/docker/images/debian/Dockerfile
  • packages/bruno-cli/docker/images/debian/README.md
  • packages/bruno-cli/docker/smoke-test.sh
✅ Files skipped from review due to trivial changes (2)
  • packages/bruno-cli/docker/images/debian/README.md
  • packages/bruno-cli/docker/images/alpine/Dockerfile
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/bruno-cli/docker/images/alpine/README.md
  • packages/bruno-cli/docker/images/debian/Dockerfile

Comment thread packages/bruno-cli/docker/README.md Resolved
Comment thread packages/bruno-cli/docker/smoke-test.sh Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@packages/bruno-cli/docker/README.md`:
- Around line 7-17: The fenced code block under "Image structure" in README.md
lacks a language identifier (MD040); update the markdown by adding a language
tag (e.g., "text") to the tree-style fenced block so the block begins with
```text; target the fenced code block shown under the "Image structure" section
and ensure the opening fence includes the language identifier to satisfy the
linter.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b8dc2048-0c0c-428f-bb66-58d1de64e85b

📥 Commits

Reviewing files that changed from the base of the PR and between d3910ac and df8c4b4.

📒 Files selected for processing (6)
  • packages/bruno-cli/docker/README.md
  • packages/bruno-cli/docker/images/alpine/Dockerfile
  • packages/bruno-cli/docker/images/alpine/README.md
  • packages/bruno-cli/docker/images/debian/Dockerfile
  • packages/bruno-cli/docker/images/debian/README.md
  • packages/bruno-cli/docker/smoke-test.sh
✅ Files skipped from review due to trivial changes (1)
  • packages/bruno-cli/docker/images/debian/README.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/bruno-cli/docker/images/alpine/README.md
  • packages/bruno-cli/docker/images/debian/Dockerfile
  • packages/bruno-cli/docker/images/alpine/Dockerfile
  • packages/bruno-cli/docker/smoke-test.sh

Comment thread packages/bruno-cli/docker/README.md Resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@packages/bruno-cli/docker/smoke-test.sh`:
- Around line 3-6: The docker run invocation uses -v "$COLLECTION_PATH:/bruno"
which breaks on Windows paths; change these bind mounts to use --mount
type=bind,source="$COLLECTION_PATH",target=/bruno (preserve quoting) wherever
COLLECTION_PATH is mounted (the docker run commands around the initial -v usage
and the occurrences noted at lines 16 and 88–90) so Docker receives a
cross-platform bind mount; update any additional -v "$COLLECTION_PATH:..."
occurrences to the equivalent --mount form and keep other flags (environment
vars, image name, run-target) unchanged.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cc460a55-b809-41ee-82dc-ac996532ff44

📥 Commits

Reviewing files that changed from the base of the PR and between df8c4b4 and 09a5f38.

📒 Files selected for processing (1)
  • packages/bruno-cli/docker/smoke-test.sh

Comment thread packages/bruno-cli/docker/smoke-test.sh Resolved
Address CodeRabbit review feedback:
- Add 'text' language identifier to the image-structure tree code fence
  (markdownlint MD040).
- Add a one-line note in the run-collection section pointing Windows
  PowerShell / CMD users at ${PWD} / %cd% as the $(pwd) equivalent.

The bash examples themselves remain unchanged - non-Bash shells now have
explicit guidance without rewriting every command block.
Addresses CodeRabbit review: '-v "$COLLECTION_PATH:/bruno"' fails on
Windows-style absolute paths (e.g. C:\\repo\\collection) because the
drive-letter colon collides with -v's host:container separator.

Switch to --mount type=bind,source=...,target=..., which uses '=' as the
key separator and accepts Windows paths verbatim. Behavior is identical
on Linux/macOS (where current CI runs).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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 `@packages/bruno-cli/docker/README.md`:
- Around line 91-96: The blockquote under "Cross-platform note:" contains a
blank quoted line (a standalone ">") that triggers markdownlint MD028; remove
that empty ">" line so the blockquote flows directly into the list items
(PowerShell: `${PWD}` and CMD: `%cd%`) and keep the list contiguous within the
same blockquote to satisfy MD028.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f6ae8c92-1db4-42e3-b0f8-c57504088434

📥 Commits

Reviewing files that changed from the base of the PR and between 09a5f38 and 06d9b04.

📒 Files selected for processing (1)
  • packages/bruno-cli/docker/README.md

Comment thread packages/bruno-cli/docker/README.md Resolved

@sid-bruno sid-bruno left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants