images: Add label for tagging, not tied to the fedora-toolbox name

Currently the toolbox script identifies toolbox images and containers
by checking whether the com.redhat.component label matches
"fedora-toolbox". However, as per the Fedora Container Guidelines [1],
the com.redhat.com label should match the Red Hat Bugzilla component
name where bugs against the image should be reported. This means that
images derived from the base fedora-toolbox image would likely end up
overwriting it.

One option would've been to mandate that all toolbox images have the
"fedora-toolbox-" prefix in their names. However, it's better to avoid
putting limitations on how images can be named. The "fedora" name
wouldn't anyway work for images based on other distributions, and not
all images are going to use the Red Hat bugzilla for tracking bugs.

It's better to use a tag that's uniquely associated with the toolbox
project, and isn't tied to a particular distribution or bug tracker.

[1] https://fedoraproject.org/wiki/Container:Guidelines
This commit is contained in:
Debarshi Ray 2019-03-25 19:53:04 +01:00
parent 668f7dcfa5
commit 0ab6eb7401
4 changed files with 8 additions and 4 deletions

View file

@ -1,7 +1,8 @@
FROM registry.fedoraproject.org/fedora:28
ENV NAME=fedora-toolbox VERSION=28
LABEL com.redhat.component="$NAME" \
LABEL com.github.debarshiray.toolbox="true" \
com.redhat.component="$NAME" \
name="$FGC/$NAME" \
version="$VERSION" \
usage="This image is meant to be used with the toolbox command" \

View file

@ -1,7 +1,8 @@
FROM registry.fedoraproject.org/fedora:29
ENV NAME=fedora-toolbox VERSION=29
LABEL com.redhat.component="$NAME" \
LABEL com.github.debarshiray.toolbox="true" \
com.redhat.component="$NAME" \
name="$FGC/$NAME" \
version="$VERSION" \
usage="This image is meant to be used with the toolbox command" \

View file

@ -1,7 +1,8 @@
FROM registry.fedoraproject.org/fedora:30
ENV NAME=fedora-toolbox VERSION=30
LABEL com.redhat.component="$NAME" \
LABEL com.github.debarshiray.toolbox="true" \
com.redhat.component="$NAME" \
name="$FGC/$NAME" \
version="$VERSION" \
usage="This image is meant to be used with the toolbox command" \

View file

@ -1,7 +1,8 @@
FROM registry.fedoraproject.org/fedora:31
ENV NAME=fedora-toolbox VERSION=31
LABEL com.redhat.component="$NAME" \
LABEL com.github.debarshiray.toolbox="true" \
com.redhat.component="$NAME" \
name="$FGC/$NAME" \
version="$VERSION" \
usage="This image is meant to be used with the toolbox command" \