Skip to main content

Manage huge sets of Docker images using matrix builds

Project description

Generi logo

📚 Documentation

🐳 About

Generi is a tool to automatically create Dockerfiles and build images for a large combination of different factors. It is the right tool if you need to build many similar images with slightly different parameters.

For example, say you are developing an app. You might want to build one docker image for python 2.7, 3.6, 3.8. And for each python version, you need one with a database included or not. And all that for each tag. If you have experienced a scenario like this, try out Generi.

🎇 Features

  • Configuration in yaml
  • Specify different parameter to form a build matrix
  • Generate Dockerfile for each combination
  • Build all variations of your image with one command
  • Push to the repository of your choice
  • Everything customisable using Jinja

✈️ Quickstart

Generi can be configured using a simple yaml file that defines your matrix build.

schema.yaml

parameters:
  python_version:
    - 2.7
    - 3.5
    - 3.6
    - 3.7
  operating_system:
    - buster
    - alpine

template: templates
output: "output/{{ python_version }}/{{ operating_system }}"
image: "nicklehmann/myapplication:py{{ python_version }}-{{ operating_system }}"

registry:
  username: nicklehmann

templates/Dockerfile

FROM python:{{ python_version }}-{{ operating_system }}

COPY main.py main.py

CMD ["python", "main.py"]

First, render your dockerfiles by running

$ generi write schema.yaml

After that, build and optionally push your image.

$ generi build schema.yaml
$ generi push schema.yaml

For more examples, please see the usage section of the documentation.

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

Generi-0.2.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

Generi-0.2.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file Generi-0.2.0.tar.gz.

File metadata

  • Download URL: Generi-0.2.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0b9 CPython/3.8.0 Linux/5.2.21-1-MANJARO

File hashes

Hashes for Generi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ccd921169dadc292f521a86aedda05b6df21ce277b1e57bfb2c22098251a8ab8
MD5 33bac4a63c03e93d55bc0b3e990755da
BLAKE2b-256 1ca16bb7ce7d197a1b80c05d4335c58fe04f9ec2293c7a82ef3b8fcee8e1e4e8

See more details on using hashes here.

File details

Details for the file Generi-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: Generi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0b9 CPython/3.8.0 Linux/5.2.21-1-MANJARO

File hashes

Hashes for Generi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85b3a4c6bc804ba8c13ac1fca025f3208f2ab014ea69543fbb9043fe3ca2d668
MD5 ebf13c5f97358d289d6f62c7a2a5dcac
BLAKE2b-256 3863d940932f57d4978def7408cc422c0248520eeeaf813b6852f4d4c4691103

See more details on using hashes here.

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