Skip to main content
This guide covers installing Buildr and its dependencies on your system.

Prerequisites

1

Install Python

Buildr requires Python 3.x (tested on 3.6+). Verify your Python installation:
python --version
You should see Python 3.6 or higher. If not, download Python from python.org.
2

Install Docker

Buildr uses Docker to build and run containers. Install Docker for your platform:Verify Docker is running:
docker --version
docker ps
3

Configure Docker permissions (Linux only)

On Linux, add your user to the docker group to run Docker without sudo:
sudo usermod -aG docker $USER
newgrp docker
You may need to log out and back in for group changes to take effect.

Install Buildr

1

Install via pip

Install the metaparticle_pkg package from PyPI:
pip install metaparticle_pkg
This installs Buildr and its dependencies, including:
  • docker==2.7.0 - Docker SDK for Python
2

Verify installation

Verify the installation by importing the package in Python:
python -c "from metaparticle_pkg import Containerize; print('Buildr installed successfully!')"

Install from source

For development or to use the latest features, you can install Buildr from source:
1

Clone the repository

git clone https://github.com/fkjadoon94/buildr.git
cd buildr/python
2

Create a virtual environment

make venv
source venv/bin/activate
Or manually:
python -m venv venv
source venv/bin/activate
3

Install dependencies

pip install -r requirements.txt
This installs:
  • docker==2.7.0 - Docker SDK
  • flake8 - Code linting
  • pytest - Testing framework
  • pytest-cov - Code coverage
4

Run the examples

Try running one of the example applications:
cd examples/simple
python example.py
This will build and run a simple containerized application.

Development setup

If you’re contributing to Buildr or developing with the source code:
1

Install development dependencies

pip install -r requirements.txt
2

Run tests

Execute the test suite:
pytest
Or using tox for multi-environment testing:
tox
3

Run linting

Check code quality:
flake8 metaparticle_pkg/

Container registry setup

To publish container images, you need access to a container registry:

Docker Hub

1

Create a Docker Hub account

Sign up at hub.docker.com if you don’t have an account.
2

Login to Docker Hub

docker login
Enter your Docker Hub username and password when prompted.
3

Use your registry in Buildr

@Containerize(
    package={
        'name': 'myapp',
        'repository': 'docker.io/yourusername',
        'publish': True
    }
)

Other registries

Buildr works with any Docker-compatible registry:
@Containerize(
    package={
        'name': 'myapp',
        'repository': 'gcr.io/project-id',
        'publish': True
    }
)
Make sure you’re authenticated to your chosen registry before setting publish: True.

Troubleshooting

Docker daemon not running

If you see “Cannot connect to the Docker daemon”, ensure Docker is running:
# Check Docker status
docker info

# Start Docker Desktop on macOS/Windows
# or start the Docker daemon on Linux
sudo systemctl start docker

Permission denied

On Linux, if you see permission errors:
sudo usermod -aG docker $USER
newgrp docker

Import errors

If imports fail, ensure the package is installed in your active Python environment:
pip list | grep metaparticle

Next steps

With Buildr installed, you’re ready to build your first containerized application:

Quickstart

Follow the quickstart guide to create your first containerized app

Build docs developers (and LLMs) love