Add metadata to image

Also, pin base image to a specific version instead of `latest`.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
This commit is contained in:
Chris Evich
2022-11-23 18:43:36 -05:00
parent 63b00ad2e7
commit 5164551f98
2 changed files with 14 additions and 4 deletions

View File

@@ -37,4 +37,8 @@ build:
--dockerfile $CI_PROJECT_DIR/Containerfile \
--destination "${CI_REGISTRY_IMAGE}:${IMAGE_TAG}" \
--build-arg "BASE_TAG=$BASE_TAG" \
--build-arg "FLAVOR=$FLAVOR"
--build-arg "FLAVOR=$FLAVOR" \
--label "org.opencontainers.image.revision=$CI_COMMIT_SHA" \
--label "org.opencontainers.artifact.created=$CI_JOB_STARTED_AT" \
--label "org.opencontainers.image.created=$CI_JOB_STARTED_AT" \
--label "org.opencontainers.image.version=${IMAGE_TAG}"