This repository contains a Copier project template.
This template sets up a GitLab repository dedicated to building a Docker image.
It ships a GitLab CI/CD pipeline that builds, tests, and pushes the image to the registry eoncds.azurecr.io
(the default GitLab one).
-
Install Copier in your python environment of choice
pip install copier
-
From the root folder of a git repository, copy the template by running the following command and answering to the prompted questions
copier copy https://git.eon-cds.de/repos/data-science-lib/templates/copier/docker-image-creator/src.git path/to/destination
Notice that a valid
path/to/destination
can be.
(the git repository root folder).If
path/to/destination
is other than.
, make sure to trigger the CI/CD defined in the copied folder, for example by writing in the.gitlab-ci.yml
file of the root folder:build docker image: trigger: include: - local: 'path/to/destination/.gitlab-ci.yml'
-
Fill the files
Dockerfile
,determine-docker-image-tags.sh
, (optional)test.sh
-
Push to GitLab and watch CI/CD do everything for you 😉