Use OCI annotations for 2nd layer images (#47)

This commit is contained in:
Lukas Magauer 2023-11-28 23:58:50 +01:00 committed by GitHub
parent be04407560
commit 47db325810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 6 deletions

View File

@ -55,7 +55,8 @@ jobs:
./Containerfile-${{ matrix.type }} ./Containerfile-${{ matrix.type }}
labels: | labels: |
name=rockylinux name=rockylinux
version=${{ matrix.version.major }}-ubi-${{ matrix.type }} org.opencontainers.image.title=rockylinux
org.opencontainers.image.version=${{ matrix.version.major }}-ubi-${{ matrix.type }}
oci: true oci: true
tags: ${{ matrix.registry.domain }}/${{ matrix.registry.account }}/rockylinux:${{ matrix.version.major }}-ubi-${{ matrix.type }} tags: ${{ matrix.registry.domain }}/${{ matrix.registry.account }}/rockylinux:${{ matrix.version.major }}-ubi-${{ matrix.type }}

View File

@ -43,6 +43,7 @@ jobs:
./Containerfile-${{ matrix.type }} ./Containerfile-${{ matrix.type }}
labels: | labels: |
name=rockylinux name=rockylinux
version=${{ matrix.version.major }}-ubi-${{ matrix.type }} org.opencontainers.image.title=rockylinux
org.opencontainers.image.version=${{ matrix.version.major }}-ubi-${{ matrix.type }}
oci: true oci: true
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_ACCOUNT }}/rockylinux:${{ matrix.version.major }}-ubi-${{ matrix.type }} tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_ACCOUNT }}/rockylinux:${{ matrix.version.major }}-ubi-${{ matrix.type }}

View File

@ -2,9 +2,12 @@ ARG ImageVersion
FROM rockylinux/rockylinux:$ImageVersion-ubi FROM rockylinux/rockylinux:$ImageVersion-ubi
LABEL summary="Rocky Linux UBI init image" \ LABEL summary="Rocky Linux UBI init image" \
description="This image is designed to run an init system as PID 1 for running multi-services inside a container." \
usage="Do not use directly. Use as a base image for daemons. Install chosen packages and 'systemctl enable' them." \ usage="Do not use directly. Use as a base image for daemons. Install chosen packages and 'systemctl enable' them." \
maintainer="Magauer Lukas <lukas@magauer.eu>" org.opencontainers.image.authors="Magauer Lukas <lukas@magauer.eu>" \
org.opencontainers.image.description="This image is designed to run an init system as PID 1 for running multi-services inside a container." \
org.opencontainers.image.licenses="BSD-3-Clause" \
org.opencontainers.image.url="https://github.com/rocky-linux/sig-cloud-instance-images" \
org.opencontainers.image.vendor="Rocky Enterprise Software Foundation"
CMD ["/sbin/init"] CMD ["/sbin/init"]

View File

@ -7,8 +7,11 @@ RUN rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/
FROM scratch FROM scratch
LABEL summary="Rocky Linux UBI micro image" \ LABEL summary="Rocky Linux UBI micro image" \
description="Very small image which doesn't install the package manager." \ org.opencontainers.image.authors="Magauer Lukas <lukas@magauer.eu>" \
maintainer="Magauer Lukas <lukas@magauer.eu>" org.opencontainers.image.description="Very small image which doesn't install the package manager." \
org.opencontainers.image.licenses="BSD-3-Clause" \
org.opencontainers.image.url="https://github.com/rocky-linux/sig-cloud-instance-images" \
org.opencontainers.image.vendor="Rocky Enterprise Software Foundation"
COPY --from=ubi-micro-build /mnt/rootfs/ / COPY --from=ubi-micro-build /mnt/rootfs/ /
COPY --from=ubi-micro-build /etc/yum.repos.d/* /etc/yum.repos.d/ COPY --from=ubi-micro-build /etc/yum.repos.d/* /etc/yum.repos.d/