Use OCI annotations for 2nd layer images

This commit is contained in:
Lukas Magauer 2023-11-28 23:20:10 +01:00
parent be04407560
commit f6e5a3490b
No known key found for this signature in database
4 changed files with 14 additions and 6 deletions

View File

@ -55,7 +55,8 @@ jobs:
./Containerfile-${{ matrix.type }}
labels: |
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
tags: ${{ matrix.registry.domain }}/${{ matrix.registry.account }}/rockylinux:${{ matrix.version.major }}-ubi-${{ matrix.type }}

View File

@ -43,6 +43,7 @@ jobs:
./Containerfile-${{ matrix.type }}
labels: |
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
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
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." \
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"]

View File

@ -7,8 +7,11 @@ RUN rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/
FROM scratch
LABEL summary="Rocky Linux UBI micro image" \
description="Very small image which doesn't install the package manager." \
maintainer="Magauer Lukas <lukas@magauer.eu>"
org.opencontainers.image.authors="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 /etc/yum.repos.d/* /etc/yum.repos.d/