Skip to content

Commit 665d38c

Browse files
authored
Merge pull request #437 from os2display/feature/oci-image-labels
2 parents 456dcd5 + 70befa2 commit 665d38c

4 files changed

Lines changed: 27 additions & 4 deletions

File tree

.github/workflows/build-images.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ jobs:
9898
uses: docker/metadata-action@v6
9999
with:
100100
images: ghcr.io/os2display/display-api-service-nginx
101+
# Override the source-repo defaults; without this the Nginx image
102+
# would publish title/description copied from display-api-service.
103+
labels: |
104+
org.opencontainers.image.title=display-api-service-nginx
105+
org.opencontainers.image.description=Nginx reverse proxy fronting the OS2Display API image
101106
tags: |
102107
# develop branch → 'develop'
103108
type=ref,event=branch

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ All notable changes to this project will be documented in this file.
77
- Fixed Calendar and Colibo feed configuration urls and added [] result when no locationEndpoint is set.
88
- Fixed baked-in `.env` shipping `APP_ENV=dev` in the API image; rewritten to `prod` at build time so
99
direct reads don't try to bootstrap a dev environment the prod-only dependencies can't satisfy.
10+
- Aligned API and Nginx image labels with the OCI image spec: dropped deprecated `LABEL maintainer`,
11+
added `org.opencontainers.image.{authors,vendor,documentation,base.name}`, and fixed the Nginx image's
12+
`title`/`description` so it stops inheriting the source-repo defaults.
1013

1114
## [3.0.0-rc2] - 2026-05-05
1215

infrastructure/display-api-service/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Assets build
33
################################
44
FROM node:24-alpine AS assets_builder
5-
LABEL maintainer="ITK Dev <itkdev@ba.aarhus.dk>"
65

76
ARG APP_VERSION="develop"
87

@@ -33,7 +32,6 @@ RUN npm run build
3332
# TODO: pin to a specific `alpine-1.4.x` tag (or a digest) once we
3433
# settle on a baseline. Same caveat applies to the final stage below.
3534
FROM itkdev/php8.4-fpm:alpine AS api_app_builder
36-
LABEL maintainer="ITK Dev <itkdev@ba.aarhus.dk>"
3735

3836
ARG APP_VERSION="develop"
3937
ARG APP_RELEASE_TIMESTAMP=0
@@ -90,7 +88,15 @@ RUN printf '{"releaseTimestamp": %s, "releaseTime": "%s", "releaseVersion": "%s"
9088
# PHP-FPM (API) production image
9189
################################
9290
FROM itkdev/php8.4-fpm:alpine
93-
LABEL maintainer="ITK Dev <itkdev@ba.aarhus.dk>"
91+
92+
# OCI image annotations. `title`, `description`, `url`, `source`, `version`,
93+
# `created`, `revision` and `licenses` are injected at build time by the
94+
# docker/metadata-action step in .github/workflows/build-images.yml; the
95+
# four below are not emitted by that action and have to live here.
96+
LABEL org.opencontainers.image.authors="ITK Dev <itkdev@ba.aarhus.dk>" \
97+
org.opencontainers.image.vendor="OS2Display" \
98+
org.opencontainers.image.documentation="https://github.com/os2display/display-api-service#readme" \
99+
org.opencontainers.image.base.name="itkdev/php8.4-fpm:alpine"
94100

95101
ENV APP_ENV=prod \
96102
PHP_OPCACHE_ENABLED=1 \

infrastructure/nginx/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ FROM ${APP_IMAGE}:${APP_VERSION} AS app
1010

1111
######## Nginx production image ########
1212
FROM nginxinc/nginx-unprivileged:alpine
13-
LABEL maintainer="ITK Dev <itkdev@ba.aarhus.dk>"
13+
14+
# OCI image annotations. `title`, `description`, `url`, `source`, `version`,
15+
# `created`, `revision` and `licenses` are injected at build time by the
16+
# docker/metadata-action step in .github/workflows/build-images.yml — the
17+
# nginx-specific `title`/`description` overrides live in that workflow
18+
# because metadata-action's --label flags win over Dockerfile LABELs.
19+
LABEL org.opencontainers.image.authors="ITK Dev <itkdev@ba.aarhus.dk>" \
20+
org.opencontainers.image.vendor="OS2Display" \
21+
org.opencontainers.image.documentation="https://github.com/os2display/display-api-service#readme" \
22+
org.opencontainers.image.base.name="nginxinc/nginx-unprivileged:alpine"
1423

1524
ARG UID=101
1625

0 commit comments

Comments
 (0)