Skip to main content

doimbu | doimbu - Docker Image Builder

Lightweight tool for docker image creation with multiple variants.

doimbu

Quick summary

Docker image creation with multiple variants with a single small command.

Scenario

Some docker images need to be delivered in multiple variants.
For example, every mongodb image version have multiple suffixes:

  • 7.0.14-ubi8
  • 7.0.14-ubi9
  • 7.0.14-ubuntu2204

When you change the version of these images, you'll need to tediously issue slightly changed long docker build commands for every variant.

Doimbu streamlines this task, with a config file you'll store all your docker configuration that you need for your docker build commands, and with a single command you'll create the docker build commands to all docker image variants that you need.

Table of contents

Dependencies

Required installed software:
(not covered in these instructions)

  • docker 27.3.1+
  • python 3.12.3+
  • poetry 1.8.4+ (optional)

(development and testing versions, it may be compatible with previous versions)

Installation

Global installation

pip install doimbu

(it's recommended to use a virtual environment instead of installing it globally)

Virtualenv installation

python -m venv venv
source venv/bin/activate
pip install doimbu
deactivate

Image Tag Pattern

[tag_namespace/][tag_repository]:[version]-[variant]

Tab pattern example

  • mongodb/mongodb-community-server:7.0.14-ubi8
  • mongodb/mongodb-community-server:7.0.14-ubi9
  • mongodb/mongodb-community-server:7.0.14-ubuntu2204

Configuration

Doimbu retrieves its configuration from 4 sources:

  • project root path
  • project directory structure
  • doimbu.ini configuration file
  • command line parameters

project path

tag_repository
The tag repository is retrieved from the project root path leaf.

project directory structure

variant
A directory called variants should be created at your project root path.
Inside this directory, subdirectories containing Dockerfiles should be created for each image variant.

doimbu.ini

All build configurations are placed at this file, including overrides for the tag_repository and variant.

Samples

  • Only mandatory configuration doimbu.ini (default_variant and vesion).
  • Full sample doimbu.ini (with all available parameters).

command line parameters

All configuration that can be placed in doimbu.ini can also be overridden by command line parameters.

A simple way to check all command line options is:

python -m doimbu --help

Usage

Minimal usage form

(all config from file system and doimbu.ini)

python -m doimbu

Usage with parameters

python -m doimbu --default-variant nobel --tag-namespace mongodb --tag-repository mongodb-community-server --build-arg 'git_username="jhonny joe"' --build-arg 'git_user_email="jhonny@joe.com"' --dry-run

How to run tests

To execute the tests, execute the following command:

poetry run pytest

Contributing

Contributing instructions can be found here.

Contact

alex carvalho - linkedin.com/in/alex-carvalho-big-data

Release files for doimbu 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for doimbu 0.7.0
File Size Uploaded
doimbu-0.7.0.tar.gz 1.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for doimbu 0.7.0
File Interpreter ABI Platform
doimbu-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / doimbu-0.7.0.tar.gz

Download URL doimbu-0.7.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
051ecbe573023b090b883ee4f896f5e24f30529e227b6232ab95e5a0fae091c2
BLAKE2b-256 checksum
How to use checksums
8c53db895bf5457161c8bd6164100432455c5ac88946c88f8ccba9222ff08a59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-51-generic

Release files / doimbu-0.7.0-py3-none-any.whl

Download URL doimbu-0.7.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a76b706805341cdd9459ecec3b7ad3b8832a8ab79658538ac0aa7dae741b724d
BLAKE2b-256 checksum
How to use checksums
36bccc06dd6ed36bfc2f60f9d3a762d456ae6af7df9b837a7e859f7767d9fdbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-51-generic

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page