Skip to content

Commit

Permalink
Add all org.opencontainers.image.xxx labels using --label instead…
Browse files Browse the repository at this point in the history
… of `LABEL`
  • Loading branch information
leojonathanoh committed Mar 13, 2023
1 parent bc9069e commit 2c28635
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ jobs:
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
# The rest of the org.opencontainers.image.xxx labels are dynamically generated
labels: |
org.opencontainers.image.description=CNI Plugins
org.opencontainers.image.licenses=Apache License 2.0
# See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache
- name: Set up QEMU
Expand Down Expand Up @@ -131,6 +135,7 @@ jobs:
platforms: linux/amd64,linux/arm,linux/arm64,linux/mips64le,linux/ppc64le,linux/riscv64,linux/s390x
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ RUN set -eux; \

# This is the final, minimal container
FROM busybox as final
LABEL org.opencontainers.image.source https://github.com/containernetworking/plugins
LABEL org.opencontainers.image.description="CNI Plugins docker image"
LABEL org.opencontainers.image.licenses="Apache License 2.0"
COPY docker-installer/install_cni_plugins.sh /script/install_cni_plugins.sh
COPY --from=build /opt/cni/bin /opt/cni/bin
ENV FORCE=
Expand Down

0 comments on commit 2c28635

Please sign in to comment.