Skip to content

Metadata displaying under container image overview

Davide Rovelli requested to merge feat/3 into master

(désolé pour l'anglais, plus vite à écrire pour moi)

Closes #3 (closed)

Changes

1 - custom metadata displaying on artifact overview

The list of metadata in the csan/metadata file will be included in the container image (artifact) overview tab IF matched by a label defined in the container recipe. Example in this MR:

Dockerfile:

FROM godlovedc/lolcow

LABEL maintainer="drovelli" mesocentre="ICI - Centrale Nantes" 
LABEL example="is this displayed in the artifact view?"
LABEL software_version="v1.0"
LABEL description="LOLCOW light container for label testing on artifacts attributes"
LABEL test="this label should not be displayed"
  • csan/metadata file
# list of metadata to display for an artifiact
example # comments allowed such as this one
mesocentre
software_version
description
  • Harbor container display - note that label test is not included

metadata_harbor

2 - CSAN folder in the repository's home

A csan folder was created alongside harbor files to add custom code relative to CSAN and separate it from Harbor source. This folder is copied into the harbor-core container during build so that we can access files (such as metadata) from Harbor app.

3 - Small local deployment guide on README

Discussion points

  • Image metadata are taken from container labels (such as LABEL for Docker and %label for singularity). Is that the right objective? I just assumed that because I don't know any other way of adding metadata to the OCI image manifest from a user point of view

  • Right now metadata is not enforced meaning no metadata label = empty field in the artifact overview. Should it be like this? Considering that enforcing might require deeper changes in the Harbor code

Merge request reports