Fix Docker labels

This commit is contained in:
CrazyMax 2019-10-20 05:18:58 +02:00
parent 13cec3d9a9
commit cf603f0736
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 13 additions and 6 deletions

View File

@ -41,9 +41,9 @@ jobs:
run: |
docker buildx build --platform ${{ steps.prepare.outputs.docker_platforms }} \
--output "type=image,push=false" \
--label "org.label-schema.build-date=${{ steps.prepare.outputs.build_date }}" \
--label "org.label-schema.version=${{ steps.prepare.outputs.version }}" \
--label "org.label-schema.vcs-ref=${GITHUB_SHA::8}" \
--build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}" \
--build-arg "VCS_REF=${GITHUB_SHA::8}" \
--build-arg "VERSION=${{ steps.prepare.outputs.version }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:latest" \
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--file Dockerfile .
@ -60,9 +60,9 @@ jobs:
run: |
docker buildx build --platform ${{ steps.prepare.outputs.docker_platforms }} \
--output "type=image,push=true" \
--label "org.label-schema.build-date=${{ steps.prepare.outputs.build_date }}" \
--label "org.label-schema.version=${{ steps.prepare.outputs.version }}" \
--label "org.label-schema.vcs-ref=${GITHUB_SHA::8}" \
--build-arg "BUILD_DATE=${{ steps.prepare.outputs.build_date }}" \
--build-arg "VCS_REF=${GITHUB_SHA::8}" \
--build-arg "VERSION=${{ steps.prepare.outputs.version }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:latest" \
--file Dockerfile .

View File

@ -1,14 +1,21 @@
# syntax=docker/dockerfile:experimental
FROM --platform=${TARGETPLATFORM:-linux/amd64} adoptopenjdk:12-jre-hotspot
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN printf "I am running on ${BUILDPLATFORM:-linux/amd64}, building for ${TARGETPLATFORM:-linux/amd64}\n$(uname -a)\n"
LABEL maintainer="CrazyMax" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="jetbrains-license-server" \
org.label-schema.description="JetBrains License Server" \
org.label-schema.version=$VERSION \
org.label-schema.url="https://github.com/crazy-max/docker-jetbrains-license-server" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/crazy-max/docker-jetbrains-license-server" \
org.label-schema.vendor="CrazyMax" \
org.label-schema.schema-version="1.0"