From 4ca9dc6ad4b905ea74e9d693fee82931e72a25a4 Mon Sep 17 00:00:00 2001 From: Flavio Heleno Date: Fri, 1 Apr 2022 14:47:26 -0300 Subject: [PATCH] Add more Docker Image Metadata --- .github/workflows/build-docker-image.yml | 6 ++++++ docker/nginx.Dockerfile | 8 ++++++-- docker/php.Dockerfile | 16 ++++++++++++---- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index aa0de87f..a248f39c 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -43,6 +43,8 @@ jobs: with: push: false load: true + build-args: + "VERSION=${{ steps.prepare-build.outputs.environment }}-${{ steps.prepare-build.outputs.short }}" tags: package-health/nginx:${{ steps.prepare-build.outputs.environment }}-${{ steps.prepare-build.outputs.short }} file: ./docker/nginx.Dockerfile context: . @@ -54,6 +56,8 @@ jobs: with: push: false load: true + build-args: + "VERSION=${{ steps.prepare-build.outputs.environment }}-${{ steps.prepare-build.outputs.short }}" tags: package-health/php-fpm:${{ steps.prepare-build.outputs.environment }}-${{ steps.prepare-build.outputs.short }} file: ./docker/php.Dockerfile target: fpm @@ -66,6 +70,8 @@ jobs: with: push: false load: true + build-args: + "VERSION=${{ steps.prepare-build.outputs.environment }}-${{ steps.prepare-build.outputs.short }}" tags: package-health/php-cli:${{ steps.prepare-build.outputs.environment }}-${{ steps.prepare-build.outputs.short }} file: ./docker/php.Dockerfile target: cli diff --git a/docker/nginx.Dockerfile b/docker/nginx.Dockerfile index a0199b3b..59ec86db 100644 --- a/docker/nginx.Dockerfile +++ b/docker/nginx.Dockerfile @@ -27,9 +27,13 @@ HEALTHCHECK --interval=1m30s --timeout=10s --retries=3 --start-period=40s CMD cu #============================================ # Metadata #============================================ -LABEL org.opencontainers.image.authors="flaviohbatista@gmail.com" \ +ARG VERSION=latest +LABEL maintainer="Flavio Heleno " \ + org.opencontainers.image.authors="flaviohbatista@gmail.com" \ org.opencontainers.image.title="PHP-Package-Health-NGINX" \ org.opencontainers.image.url="https://github.com/package-health/php" \ - org.opencontainers.image.vendor="Package Health" + org.opencontainers.image.vendor="Package Health" \ + org.opencontainers.image.version="${VERSION}" \ + org.opencontainers.image.base.name="ghcr.io/package-health/pph-nginx:${VERSION}" WORKDIR /usr/share/nginx/html diff --git a/docker/php.Dockerfile b/docker/php.Dockerfile index d578bb29..ca54e2db 100644 --- a/docker/php.Dockerfile +++ b/docker/php.Dockerfile @@ -135,10 +135,14 @@ WORKDIR /var/www/html/bin #============================================ # Metadata #============================================ -LABEL org.opencontainers.image.authors="flaviohbatista@gmail.com" \ +ARG VERSION=latest +LABEL maintainer="Flavio Heleno " \ + org.opencontainers.image.authors="flaviohbatista@gmail.com" \ org.opencontainers.image.title="PHP-Package-Health: PHP-CLI" \ org.opencontainers.image.url="https://github.com/package-health/php" \ - org.opencontainers.image.vendor="Package Health" + org.opencontainers.image.vendor="Package Health" \ + org.opencontainers.image.version="${VERSION}" \ + org.opencontainers.image.base.name="ghcr.io/package-health/pph-php-cli:${VERSION}" ENTRYPOINT ["/usr/bin/dumb-init", "--"] CMD ["php"] @@ -212,10 +216,14 @@ HEALTHCHECK --interval=1m30s --timeout=10s --retries=3 --start-period=40s CMD ph #============================================ # Metadata #============================================ -LABEL org.opencontainers.image.authors="flaviohbatista@gmail.com" \ +ARG VERSION=latest +LABEL maintainer="Flavio Heleno " \ + org.opencontainers.image.authors="flaviohbatista@gmail.com" \ org.opencontainers.image.title="PHP-Package-Health: PHP-FPM" \ org.opencontainers.image.url="https://github.com/package-health/php" \ - org.opencontainers.image.vendor="Package Health" + org.opencontainers.image.vendor="Package Health" \ + org.opencontainers.image.version="${VERSION}" \ + org.opencontainers.image.base.name="ghcr.io/package-health/pph-php-fpm:${VERSION}" ENTRYPOINT ["/usr/bin/dumb-init", "--"] CMD ["php-fpm"]