Manage huge sets of Docker images using matrix builds š³
100
![]()
š Documentationā
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.
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.
Content type
Image
Digest
Size
111.5 MB
Last updated
almost 7 years ago
docker pull nicklehmann/generi:py3.8-alpine