Skip to main content

Dibber - Docker image manager

Project description

Dibber - Docker image builder

Builds your container images automatically, like magic. Good for handling common base images for all your projects, apps, whatever.

Usage examples:

How do you use this then?

If you want to use it with GitHub it takes just a few steps:

  1. Create a new repository based on the template repository.

  2. Fill in dibber.toml: Basically you need to set up your GitHub username prefixed by the ghcr.io for them to land in GitHub packages

  3. Images and versions: First level of subdirectories in this repo is "images", as in the repository names (username/<repository>) for Docker hub. The subdirectories in that defines the "versions" - basically default tags for things to be built for that repository. Put your Dockerfile and accompanying files under <image>/<version>/

  4. Additional tags: In <image>/<version>/config.yaml you can define additional tags for the built image, like latest, or whatever aliases you may want for it.

If you want to do it on your own pipelines, you can do the above but pay a bit more attention to dibber.toml and then on your pipeline agent run in the checkout:

pip install dibber
dibber build-multiplatform
dibber upload
dibber scan

If you have images other images depend on, check out the priority_builds -setting. Each list within it gets assigned a priority and can be built in parallel with --parallel argument, the rest of the images will then get built after everything in the priority_builds.

# Simple priority to a couple of images
priority_builds = [
   "ubuntu-base/20.04",
   "ubuntu-base/22.04",
]
# Tiered priorities of things that depend on earlier priorities
priority_builds = [
  [
      "ubuntu-base/20.04",
      "ubuntu-base/22.04",
  ],
  [
      "python-base/ubuntu20.04-python3.9",
      "python-base/ubuntu22.04-python3.10",
  ]
]

But what does it require?

You will need:

  • Docker CLI >= 20.10.0 (we use docker push --all-tags to save some time)
  • Python >= 3.11
  • uv (at least for development)

You can also use this to push to Dockerhub (but why would you want to). If you do you'll just need to add a DOCKERHUB_TOKEN secret ("token" is a personal access token) that will be used to log into your account for upload. This needs to be for the Docker hub user configured in dibber.toml.

The scan command uses trivy which you will need installed on your system first.

Multiplatform support

There are several technical restrictions when building images for multiple platforms with buildx, such as that buildx can't find an image in local docker environment (see notes in output section of the docs). But it's possible to push base images right away to a docker registry and then explicitly define this registry in FROM statements.

That's why there are 2 options to build images:

  • dibber build builds all images for the current platform only with docker build under the hood. It's suitable for local development of the images
  • dibber build-multiplatform builds all images using docker buildx build for linux/amd64 and linux/arm64. It requires extra setup (check pipeline code) and is not recommended for local development

Contributions

If you plan on contributing to the code ensure you use pre-commit to guarantee the code style stays uniform etc.

Also, please open an issue first to discuss the idea before sending a PR so that you know if it would be wanted or needs re-thinking or if you should just make a fork for yourself.

You'll likely want to clone this repository, then in its parent directory run:

uv tool install --editable dibber

If I use this it means you own my things, right?

No. You are responsible for and own your own things. This code is licensed under the BSD 3-clause license.

Financial support

This project has been made possible thanks to Cocreators and Lietu. You can help us continue our open source work by supporting us on Buy me a coffee .

"Buy Me A Coffee"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dibber-1.0.7.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dibber-1.0.7-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file dibber-1.0.7.tar.gz.

File metadata

  • Download URL: dibber-1.0.7.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dibber-1.0.7.tar.gz
Algorithm Hash digest
SHA256 f607424e629b3db0634142f55ad5c4d0b1138bd6841d8a9c9ce609bf556ef428
MD5 9e597f87d299ee233d797f95de042713
BLAKE2b-256 68955505ec8a1959046b9409d99847f31efbc63d4f94a22c2d4f206e2f1e8433

See more details on using hashes here.

Provenance

The following attestation bundles were made for dibber-1.0.7.tar.gz:

Publisher: build-and-upload.yaml on lietu/dibber

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dibber-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: dibber-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dibber-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6621777848f4ee8eb7f1feeb2b5c4a4009dcfab1898c9cb3c1727a3b091bc2e5
MD5 73a212e0ed9d0a22d55f5c7ad83eb303
BLAKE2b-256 3e749bd23fd062920add57be5830663372981ff12dab3a757bb5c156ff2c813d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dibber-1.0.7-py3-none-any.whl:

Publisher: build-and-upload.yaml on lietu/dibber

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page