added labels

This commit is contained in:
Tobias Schmidl 2023-01-13 18:27:50 +01:00
parent 3058ad3624
commit 8033fedf18
2 changed files with 3 additions and 1 deletions

View file

@ -28,7 +28,7 @@ docker-build:
tag=":$CI_COMMIT_REF_SLUG" tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi fi
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . - docker build --pull --label org.label-schema.build-date=$(date -u +'%FT%H:%M:%SZ') --label org.label-schema.name="${NAME}" --label org.label-schema.vcs-url="${CI_PROJECT_URL}" --label org.label-schema.vcs-ref="${CI_COMMIT_SHA:0:8}" -t "${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_NAME}:${CI_COMMIT_SHA:0:8}" -t "$CI_REGISTRY_IMAGE${tag}" .
- docker push "$CI_REGISTRY_IMAGE${tag}" - docker push "$CI_REGISTRY_IMAGE${tag}"
# Run this job in a branch where a Dockerfile exists # Run this job in a branch where a Dockerfile exists
rules: rules:

View file

@ -1,5 +1,7 @@
FROM alpine FROM alpine
LABEL org.label-schema.schema-version="1.0.0-rc1"
RUN apk fix && \ RUN apk fix && \
apk --no-cache --update add git git-lfs gpg less man-pages openssh patch git-annex && \ apk --no-cache --update add git git-lfs gpg less man-pages openssh patch git-annex && \
git lfs install git lfs install