Conversation
WalkthroughThis pull request adds Docker containerization support for the Bruno CLI, introducing a Dockerfile based on Alpine Node, npm-installed Bruno CLI with configurable versioning, non-root user execution, a .dockerignore for build context optimization, and comprehensive usage documentation. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 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)
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 (1)
container/Dockerfile (1)
4-4: Remove unnecessary chown operation.Since the Dockerfile doesn't COPY any files during build, changing ownership of the empty
/brunodirectory has no effect. Volume mounts at runtime will override any image-layer ownership. This line can be safely removed.♻️ Proposed simplification
WORKDIR /bruno -RUN chown -R nobody:nobody /bruno🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@container/Dockerfile` at line 4, Remove the no-op ownership change by deleting the RUN chown -R nobody:nobody /bruno instruction from the Dockerfile; since no files are copied into /bruno during build and runtime volumes will override image-layer ownership, simply remove the RUN chown line (referenced here as the RUN chown -R nobody:nobody /bruno command) to simplify the Dockerfile.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@container/readme.md`:
- Around line 34-37: The README currently only shows the Unix-style docker run
with -v "$(pwd):/bruno"; add Windows-compatible examples for cmd.exe and
PowerShell by including the equivalent docker run commands using "%cd%:/bruno"
for cmd.exe and "${PWD}:/bruno" for PowerShell alongside the existing Unix
example, and update the explanatory line after the docker run snippet (the mount
description) to state that the examples show how to mount the current directory
on macOS/Linux, Windows cmd.exe, and Windows PowerShell; reference the existing
docker run line and its mount explanation so the new examples appear in the same
section.
---
Nitpick comments:
In `@container/Dockerfile`:
- Line 4: Remove the no-op ownership change by deleting the RUN chown -R
nobody:nobody /bruno instruction from the Dockerfile; since no files are copied
into /bruno during build and runtime volumes will override image-layer
ownership, simply remove the RUN chown line (referenced here as the RUN chown -R
nobody:nobody /bruno command) to simplify the Dockerfile.
🪄 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: a56f2e6d-bb9f-454c-afa0-9ffe29d0f031
📒 Files selected for processing (3)
container/.dockerignorecontainer/Dockerfilecontainer/readme.md
| docker run --rm -v "$(pwd):/bruno" ghcr.io/usebruno/bruno-cli run <collection> | ||
| ``` | ||
|
|
||
| > `-v $(pwd):/bruno` mounts your current directory into the working directory of the container. |
There was a problem hiding this comment.
Provide Windows-compatible volume mount examples.
The $(pwd) syntax is Unix-specific and won't work on Windows cmd.exe. Since Bruno is cross-platform, the documentation should include Windows alternatives.
📝 Proposed enhancement
You can run any `bru` command. For example, to run a collection:
+**Linux/macOS:**
```sh
docker run --rm -v "$(pwd):/bruno" ghcr.io/usebruno/bruno-cli run <collection>+Windows (cmd.exe):
+cmd +docker run --rm -v "%cd%:/bruno" ghcr.io/usebruno/bruno-cli run <collection> +
+
+Windows (PowerShell):
+powershell +docker run --rm -v "${PWD}:/bruno" ghcr.io/usebruno/bruno-cli run <collection> +
+
-v $(pwd):/brunomounts your current directory into the working directory of the container.
</details>
As per coding guidelines, Bruno is cross-platform and runs on macOS, Windows, and Linux, so documentation should handle platform differences.
<details>
<summary>🤖 Prompt for AI Agents</summary>
Verify each finding against the current code and only fix it if needed.
In @container/readme.md around lines 34 - 37, The README currently only shows
the Unix-style docker run with -v "$(pwd):/bruno"; add Windows-compatible
examples for cmd.exe and PowerShell by including the equivalent docker run
commands using "%cd%:/bruno" for cmd.exe and "${PWD}:/bruno" for PowerShell
alongside the existing Unix example, and update the explanatory line after the
docker run snippet (the mount description) to state that the examples show how
to mount the current directory on macOS/Linux, Windows cmd.exe, and Windows
PowerShell; reference the existing docker run line and its mount explanation so
the new examples appear in the same section.
</details>
<!-- fingerprinting:phantom:triton:puma:4cc76aaf-233e-4a51-92e4-b88689c65af1 -->
<!-- This is an auto-generated comment by CodeRabbit -->
There was a problem hiding this comment.
Pull request overview
Adds initial containerization assets for running the Bruno CLI via Docker, along with basic usage documentation, to address the “Run with Docker” request (#1415).
Changes:
- Added
container/Dockerfileto build a Bruno CLI container image. - Added
container/readme.mdwith build/pull/run instructions. - Added
container/.dockerignorefor the container build context.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| container/Dockerfile | Defines a Node-based image that installs @usebruno/cli and runs bru as a non-root user. |
| container/readme.md | Documents expected registry image, build args, and example docker run usage. |
| container/.dockerignore | Reduces build context content for container builds (when using container/ as the build context). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## Pre-built images | ||
|
|
||
| Pre-built images are available at [ghcr.io/usebruno/bruno-cli](https://github.com/usebruno/bruno/pkgs/container/bruno-cli): | ||
|
|
||
| ```sh | ||
| docker pull ghcr.io/usebruno/bruno-cli:latest | ||
| ``` |
There was a problem hiding this comment.
This README states that pre-built images are available at ghcr.io/usebruno/bruno-cli, but the repo currently doesn’t include any workflow/pipeline for building and publishing this image. Unless images already exist externally, this is likely inaccurate; consider rewording to “Once published…” (or removing the section) until a publishing workflow is added.
| ## Build the image yourself | ||
|
|
||
| ```sh | ||
| docker build -t bruno-cli . | ||
| ``` |
There was a problem hiding this comment.
The build command is ambiguous given the Dockerfile lives under container/. docker build -t bruno-cli . will only work if the user first cds into container/; from the repo root it will not pick up this Dockerfile (and container/.dockerignore also won’t apply). Suggest updating the docs to either explicitly cd container before building, or provide a root-safe command like using -f container/Dockerfile with build context container/.
| @@ -0,0 +1,12 @@ | |||
| FROM node:25.9.0-alpine3.22 | |||
There was a problem hiding this comment.
The base image uses Node 25.9.0, but this repo pins Node via .nvmrc (.nvmrc:1 is v22.12.0, and CI uses node-version-file: '.nvmrc' in .github/workflows/npm-bru-cli.yml:29-32). Suggest basing the container on the same Node major/minor (e.g., node:22.x-alpine) to avoid runtime/CLI incompatibilities and to match the project’s supported Node version.
| FROM node:25.9.0-alpine3.22 | |
| FROM node:22.12.0-alpine3.22 |
| WORKDIR /bruno | ||
| RUN chown -R nobody:nobody /bruno | ||
|
|
||
| ARG BRUNO_VERSION=3.2.2 |
There was a problem hiding this comment.
BRUNO_VERSION defaults to 3.2.2, but the CLI package version in this repo is currently 1.16.0 (packages/bruno-cli/package.json). If 3.2.2 isn’t actually published, docker build will fail; if it is published, it’s still surprising drift. Suggest defaulting to the repo’s current CLI version or omitting the version to install the latest, and documenting the intended versioning strategy.
| ARG BRUNO_VERSION=3.2.2 | |
| # Keep this default aligned with packages/bruno-cli/package.json; override at build time if needed. | |
| ARG BRUNO_VERSION=1.16.0 |
Description
This PR adds a
Dockerfilefor build a container image.Additionally a
readme.mdfile is added for basic documentation. Maybe the links to need to be adjusted based on the registry and container name that should be used.Currently no pipeline definitions are part of this PR, since im not sure about the release processes used.
Closes #1415
Contribution Checklist:
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
Documentation