docker.recipes

Bruno

beginner

Fast and Git-friendly API client.

Overview

Bruno is an open-source API client that stores collections as plain text files in your filesystem, making it inherently Git-friendly and version control compatible. Unlike traditional API clients like Postman that rely on cloud synchronization, Bruno operates entirely offline with collections stored as Bru files that can be committed alongside your code. This approach enables teams to maintain API documentation and test suites directly within their project repositories, ensuring that API changes are tracked and versioned with the corresponding code changes. This Docker deployment of Bruno creates a containerized environment for running the web interface, making it accessible through a browser while maintaining the file-based collection storage approach. The configuration mounts a dedicated volume for collections, allowing multiple team members to share the same Bruno instance while keeping collections persistent across container restarts. The setup is particularly useful for development teams who want to centralize their API testing workflow without compromising on privacy or requiring external cloud dependencies. Development teams, DevOps engineers, and API-first organizations will find this deployment valuable for establishing a shared API testing environment that integrates naturally with their Git workflows. The containerized Bruno instance serves as a central hub for API documentation and testing while maintaining the tool's core philosophy of keeping everything under version control and fully transparent.

Key Features

  • Git-native collection storage using human-readable Bru file format
  • Built-in environment variable management with inheritance support
  • Pre-request and post-response JavaScript scripting capabilities
  • Direct import functionality for Postman, Insomnia, and OpenAPI specifications
  • Offline-first architecture with no cloud dependencies or data transmission
  • Collection-level authentication schemes including OAuth2 and Bearer tokens
  • Request chaining and variable extraction from previous responses
  • Multi-environment configuration with variable scoping and overrides

Common Use Cases

  • 1Development teams maintaining API test suites alongside source code in Git repositories
  • 2DevOps pipelines requiring automated API testing with version-controlled test cases
  • 3Privacy-conscious organizations needing API testing without cloud data exposure
  • 4Open-source projects providing API documentation and examples in repository format
  • 5Remote development teams sharing API collections through Git without external dependencies
  • 6Enterprise environments with strict data governance requiring local API testing tools
  • 7Continuous integration workflows incorporating API validation with persistent test collections

Prerequisites

  • Docker and Docker Compose installed with support for volume mounting
  • Port 3000 available on the host system for Bruno web interface access
  • Basic understanding of API testing concepts and HTTP methods
  • Familiarity with environment variables and JavaScript for advanced scripting
  • Git knowledge for managing collection files and version control integration
  • Minimum 512MB available RAM for the Bruno container runtime

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 bruno:
3 image: usebruno/bruno:latest
4 container_name: bruno
5 restart: unless-stopped
6 volumes:
7 - bruno_collections:/app/collections
8 ports:
9 - "3000:3000"
10
11volumes:
12 bruno_collections:

.env Template

.env
1# Collections stored as plain text files

Usage Notes

  1. 1Docs: https://docs.usebruno.com/
  2. 2Collections stored as plain text files (Git-friendly)
  3. 3No cloud sync required - fully offline, privacy-focused
  4. 4Import from Postman, Insomnia, or OpenAPI
  5. 5Environment variables and scripting support
  6. 6Desktop app recommended - Docker for CI/CD only

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 bruno:
5 image: usebruno/bruno:latest
6 container_name: bruno
7 restart: unless-stopped
8 volumes:
9 - bruno_collections:/app/collections
10 ports:
11 - "3000:3000"
12
13volumes:
14 bruno_collections:
15EOF
16
17# 2. Create the .env file
18cat > .env << 'EOF'
19# Collections stored as plain text files
20EOF
21
22# 3. Start the services
23docker compose up -d
24
25# 4. View logs
26docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/bruno/run | bash

Troubleshooting

  • Collections not persisting after restart: Verify the bruno_collections volume mount is properly configured and has write permissions
  • Port 3000 already in use: Change the host port mapping to an available port like '8080:3000' in the ports section
  • Import from Postman fails: Ensure the Postman collection export is in v2.1 format and contains valid JSON structure
  • Environment variables not resolving: Check variable scope hierarchy and ensure variables are defined at the correct collection or environment level
  • JavaScript scripts failing in requests: Verify script syntax and check that required variables are available in the execution context
  • Collections appear empty after container restart: Confirm the volume path permissions allow the Bruno process to read and write collection files

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Components

bruno

Tags

#bruno#api#client#git-friendly

Category

Development Tools
Ad Space