precice / systemtests

Testing preCICE / solver combinations using Docker
GNU General Public License v3.0
3 stars 4 forks source link

Use Labelling system of Docker instead of complicated tags #138

Open BenjaminRodenberg opened 4 years ago

BenjaminRodenberg commented 4 years ago

Docker provides a system for labelling images and filtering images by label:

This might help us to replace our current tagging system with something more standardized.

Example for Dockerfile.Ubuntu1804.home

One can set labels directly in the docker file:

LABEL "os"="ubuntu1804"
LABEL "petsc"=$petsc_para
LABEL "installation"="home"
LABEL "precice-branch"=$branch

Use docker inspect to check labels of an image:

            "Labels": {
                "installation": "home",
                "os": "ubuntu1604",
                "petsc": "no",
                "precice-branch": "develop"
            }

Or filter images by label:

$ docker images --filter "label=precice-branch=develop"
REPOSITORY                                      TAG                 IMAGE ID            CREATED             SIZE
precice/precice-ubuntu1804.home-develop   latest              cf81924ec458        17 minutes ago      1.17GB
BenjaminRodenberg commented 4 years ago

One argument that speaks against our current tag based labelling system is that the tags are order-sensitive. Meaning:ubuntu1804.petsc is not the same as petsc.ubuntu1804.