Skip to content

Commit 444454e

Browse files
committed
Add OCI standard labels to docker pipelines
1 parent 1aaf70d commit 444454e

28 files changed

+569
-448
lines changed

.github/workflows/docker-buildx-24-ubuntu-slim.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ jobs:
2929
- name: Verify Npm version
3030
run: npm -v
3131

32+
- name: Set metadata
33+
id: meta
34+
run: |
35+
VERSION=$(jq -r '.version' package.json)
36+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
37+
echo "VCS_REF=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
38+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
39+
3240
- name: Log in to Docker Hub
3341
uses: docker/login-action@v3
3442
with:
@@ -45,14 +53,18 @@ jobs:
4553
with:
4654
version: latest
4755

48-
- name: Run Docker Buildx with Dockerfile.24-ubuntu-slim
56+
- name: Run Docker Buildx with Dockerfile.24-ubuntu-slim for version ${{ steps.meta.outputs.VERSION }}
4957
run: |
5058
docker buildx build \
5159
--no-cache \
5260
--pull \
5361
--platform linux/amd64,linux/arm64 \
5462
-f docker/Dockerfile.24-ubuntu-slim \
5563
-t luligu/matterbridge:24-ubuntu-slim \
64+
-t luligu/matterbridge:24-ubuntu-slim-${{ steps.meta.outputs.VERSION }} \
65+
--build-args VERSION=${{ steps.meta.outputs.VERSION }} \
66+
--build-args VCS_REF=${{ steps.meta.outputs.VCS_REF }} \
67+
--build-args BUILD_DATE=${{ steps.meta.outputs.BUILD_DATE }} \
5668
--push .
5769
docker manifest inspect luligu/matterbridge:24-ubuntu-slim
5870
timeout-minutes: 60

.github/workflows/docker-buildx-alpine.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ jobs:
2929
- name: Verify Npm version
3030
run: npm -v
3131

32+
- name: Set metadata
33+
id: meta
34+
run: |
35+
VERSION=$(jq -r '.version' package.json)
36+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
37+
echo "VCS_REF=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
38+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
39+
3240
- name: Stamp build metadata into package.json
3341
run: |
3442
npm pkg set build.sha="${GITHUB_SHA}"
@@ -40,16 +48,6 @@ jobs:
4048
npm pkg set build.docker="true"
4149
npm pkg set build.dev="false"
4250
43-
- name: Extract version from package.json
44-
id: extract_version
45-
run: |
46-
VERSION=$(jq -r '.version' package.json)
47-
echo "VERSION=$VERSION" >> $GITHUB_ENV
48-
49-
- name: Echo main version ${{ env.VERSION }}
50-
run: |
51-
echo "Extracted version is: ${{ env.VERSION }}"
52-
5351
- name: Log in to Docker Hub
5452
uses: docker/login-action@v3
5553
with:
@@ -66,15 +64,18 @@ jobs:
6664
with:
6765
version: latest
6866

69-
- name: Run Docker Buildx with Dockerfile.alpine
67+
- name: Run Docker Buildx with Dockerfile.alpine for version ${{ steps.meta.outputs.VERSION }}
7068
run: |
7169
docker buildx build \
7270
--no-cache \
7371
--pull \
7472
--platform linux/amd64,linux/arm64 \
7573
-f docker/Dockerfile.alpine \
7674
-t luligu/matterbridge:alpine \
77-
-t luligu/matterbridge:alpine-${{ env.VERSION }} \
75+
-t luligu/matterbridge:alpine-${{ steps.meta.outputs.VERSION }} \
76+
--build-args VERSION=${{ steps.meta.outputs.VERSION }} \
77+
--build-args VCS_REF=${{ steps.meta.outputs.VCS_REF }} \
78+
--build-args BUILD_DATE=${{ steps.meta.outputs.BUILD_DATE }} \
7879
--push .
7980
docker manifest inspect luligu/matterbridge:alpine
8081
timeout-minutes: 60

.github/workflows/docker-buildx-dev.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ jobs:
4444
- name: Verify Npm version
4545
run: npm -v
4646

47+
- name: Set metadata
48+
id: meta
49+
run: |
50+
VERSION=$(jq -r '.version' package.json)
51+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
52+
echo "VCS_REF=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
53+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
54+
4755
- name: Stamp build metadata into package.json
4856
run: |
4957
npm pkg set build.sha="${GITHUB_SHA}"
@@ -55,16 +63,6 @@ jobs:
5563
npm pkg set build.docker="true"
5664
npm pkg set build.dev="true"
5765
58-
- name: Extract version from package.json
59-
id: extract_version
60-
run: |
61-
VERSION=$(jq -r '.version' package.json)
62-
echo "VERSION=$VERSION" >> $GITHUB_ENV
63-
64-
- name: Echo main version ${{ env.VERSION }}
65-
run: |
66-
echo "Extracted version is: ${{ env.VERSION }}"
67-
6866
- name: Log in to Docker Hub
6967
uses: docker/login-action@v3
7068
with:
@@ -81,15 +79,18 @@ jobs:
8179
with:
8280
version: latest
8381

84-
- name: Run Docker Buildx on dev
82+
- name: Run Docker Buildx with Dockerfile.dev for version ${{ steps.meta.outputs.VERSION }}
8583
run: |
8684
docker buildx build \
8785
--no-cache \
8886
--pull \
8987
--platform linux/amd64,linux/arm64 \
9088
-f docker/Dockerfile.dev \
9189
-t luligu/matterbridge:dev \
92-
-t luligu/matterbridge:dev-${{ env.VERSION }} \
90+
-t luligu/matterbridge:dev-${{ steps.meta.outputs.VERSION }} \
91+
--build-args VERSION=${{ steps.meta.outputs.VERSION }} \
92+
--build-args VCS_REF=${{ steps.meta.outputs.VCS_REF }} \
93+
--build-args BUILD_DATE=${{ steps.meta.outputs.BUILD_DATE }} \
9394
--push .
9495
timeout-minutes: 60
9596

.github/workflows/docker-buildx-latest.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ jobs:
4242
- name: Verify Npm version
4343
run: npm -v
4444

45+
- name: Set metadata
46+
id: meta
47+
run: |
48+
VERSION=$(jq -r '.version' package.json)
49+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
50+
echo "VCS_REF=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
51+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
52+
4553
- name: Stamp build metadata into package.json
4654
run: |
4755
npm pkg set build.sha="${GITHUB_SHA}"
@@ -53,16 +61,6 @@ jobs:
5361
npm pkg set build.docker="true"
5462
npm pkg set build.dev="false"
5563
56-
- name: Extract version from package.json
57-
id: extract_version
58-
run: |
59-
VERSION=$(jq -r '.version' package.json)
60-
echo "VERSION=$VERSION" >> $GITHUB_ENV
61-
62-
- name: Echo main version ${{ env.VERSION }}
63-
run: |
64-
echo "Extracted version is: ${{ env.VERSION }}"
65-
6664
- name: Log in to Docker Hub
6765
uses: docker/login-action@v3
6866
with:
@@ -79,15 +77,18 @@ jobs:
7977
with:
8078
version: latest
8179

82-
- name: Run Docker Buildx on latest
80+
- name: Run Docker Buildx with Dockerfile.latest for version ${{ steps.meta.outputs.VERSION }}
8381
run: |
8482
docker buildx build \
8583
--no-cache \
8684
--pull \
8785
--platform linux/amd64,linux/arm64 \
8886
-f docker/Dockerfile.latest \
8987
-t luligu/matterbridge:latest \
90-
-t luligu/matterbridge:${{ env.VERSION }} \
88+
-t luligu/matterbridge:${{ steps.meta.outputs.VERSION }} \
89+
--build-args VERSION=${{ steps.meta.outputs.VERSION }} \
90+
--build-args VCS_REF=${{ steps.meta.outputs.VCS_REF }} \
91+
--build-args BUILD_DATE=${{ steps.meta.outputs.BUILD_DATE }} \
9192
--push .
9293
timeout-minutes: 60
9394

.github/workflows/docker-buildx-s6-rc.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Build Docker Image s6-rc-base with buildx
1+
name: Build Docker Image s6-rc with buildx
22

33
on:
44
# Allow manual dispatch
55
workflow_dispatch:
66

77
# Cancel previous runs when a new one is triggered
88
concurrency:
9-
group: docker-build-s6-rc-base
9+
group: docker-build-s6-rc
1010
cancel-in-progress: true
1111

1212
jobs:
@@ -29,6 +29,14 @@ jobs:
2929
- name: Verify Npm version
3030
run: npm -v
3131

32+
- name: Set metadata
33+
id: meta
34+
run: |
35+
VERSION=$(jq -r '.version' package.json)
36+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
37+
echo "VCS_REF=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
38+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
39+
3240
- name: Stamp build metadata into package.json
3341
run: |
3442
npm pkg set build.sha="${GITHUB_SHA}"
@@ -40,16 +48,6 @@ jobs:
4048
npm pkg set build.docker="true"
4149
npm pkg set build.dev="false"
4250
43-
- name: Extract version from package.json
44-
id: extract_version
45-
run: |
46-
VERSION=$(jq -r '.version' package.json)
47-
echo "VERSION=$VERSION" >> $GITHUB_ENV
48-
49-
- name: Echo main version ${{ env.VERSION }}
50-
run: |
51-
echo "Extracted version is: ${{ env.VERSION }}"
52-
5351
- name: Log in to Docker Hub
5452
uses: docker/login-action@v3
5553
with:
@@ -66,15 +64,18 @@ jobs:
6664
with:
6765
version: latest
6866

69-
- name: Run Docker Buildx with Dockerfile.s6-rc
67+
- name: Run Docker Buildx with Dockerfile.s6-rc for version ${{ steps.meta.outputs.VERSION }}
7068
run: |
7169
docker buildx build \
7270
--no-cache \
7371
--pull \
7472
--platform linux/amd64,linux/arm64 \
7573
-f docker/Dockerfile.s6-rc \
7674
-t luligu/matterbridge:s6-rc \
77-
-t luligu/matterbridge:s6-rc-${{ env.VERSION }} \
75+
-t luligu/matterbridge:s6-rc-${{ steps.meta.outputs.VERSION }} \
7876
-t luligu/matterbridge:2026.2.4 \
77+
--build-args VERSION=${{ steps.meta.outputs.VERSION }} \
78+
--build-args VCS_REF=${{ steps.meta.outputs.VCS_REF }} \
79+
--build-args BUILD_DATE=${{ steps.meta.outputs.BUILD_DATE }} \
7980
--push .
8081
docker manifest inspect luligu/matterbridge:s6-rc

.github/workflows/docker-buildx-ubuntu.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ jobs:
2929
- name: Verify Npm version
3030
run: npm -v
3131

32+
- name: Set metadata
33+
id: meta
34+
run: |
35+
VERSION=$(jq -r '.version' package.json)
36+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
37+
echo "VCS_REF=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
38+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
39+
3240
- name: Stamp build metadata into package.json
3341
run: |
3442
npm pkg set build.sha="${GITHUB_SHA}"
@@ -40,16 +48,6 @@ jobs:
4048
npm pkg set build.docker="true"
4149
npm pkg set build.dev="false"
4250
43-
- name: Extract version from package.json
44-
id: extract_version
45-
run: |
46-
VERSION=$(jq -r '.version' package.json)
47-
echo "VERSION=$VERSION" >> $GITHUB_ENV
48-
49-
- name: Echo main version ${{ env.VERSION }}
50-
run: |
51-
echo "Extracted version is: ${{ env.VERSION }}"
52-
5351
- name: Log in to Docker Hub
5452
uses: docker/login-action@v3
5553
with:
@@ -66,15 +64,18 @@ jobs:
6664
with:
6765
version: latest
6866

69-
- name: Run Docker Buildx with Dockerfile.ubuntu
67+
- name: Run Docker Buildx with Dockerfile.ubuntu for version ${{ steps.meta.outputs.VERSION }}
7068
run: |
7169
docker buildx build \
7270
--no-cache \
7371
--pull \
7472
--platform linux/amd64,linux/arm64 \
7573
-f docker/Dockerfile.ubuntu \
7674
-t luligu/matterbridge:ubuntu \
77-
-t luligu/matterbridge:ubuntu-${{ env.VERSION }} \
75+
-t luligu/matterbridge:ubuntu-${{ steps.meta.outputs.VERSION }} \
76+
--build-args VERSION=${{ steps.meta.outputs.VERSION }} \
77+
--build-args VCS_REF=${{ steps.meta.outputs.VCS_REF }} \
78+
--build-args BUILD_DATE=${{ steps.meta.outputs.BUILD_DATE }} \
7879
--push .
7980
docker manifest inspect luligu/matterbridge:ubuntu
8081
timeout-minutes: 60

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ These threads already run as a workers:
5050
- npm install;
5151
- ✅ check the global node_modules directory;
5252

53+
## [3.5.5] - Dev branch
54+
55+
### Added
56+
57+
- [images]: Add OCI standard labels (https://opencontainers.org/) to docker pipelines.
58+
59+
### Changed
60+
61+
- [package]: Update dependencies.
62+
63+
<a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
64+
5365
## [3.5.4] - 2026-02-13
5466

5567
### Dev Breaking Changes

README-DOCKER.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ The image (tag **latest** 92 MB) includes Matterbridge and all official plugins,
2929

3030
The image (tag **dev** 93 MB) includes Matterbridge and all official plugins from the latest push on GitHub. It is based on `node:24-trixie-slim`. Since all official plugins are included, you can select and add a plugin without installing anything. Note: if you update to the latest **dev** from the frontend, you will override the GitHub version with the latest **dev** published on npm. The frontend shows if you are currently running the GitHub release or the latest or dev npm release.
3131

32-
The image (tag **ubuntu** 90 MB) includes only Matterbridge, using the latest release published on npm. This image (**for test and development only**) is based on `ubuntu:latest` with Node.js 24 from NodeSource. Plugins are not included in the image; they will be installed on first run. This image preinstalls `bluetooth`, `build-essential`, and `python` packages (useful for plugins that require native builds).
32+
The image (tag **ubuntu** 90 MB) includes only Matterbridge, using the latest release published on npm. This image (**for test and development only**) is based on `ubuntu:latest` with Node.js 24 from NodeSource. Plugins are not included in the image: they will be installed on first run. This image, on the first run, preinstalls `bluetooth`, `build-essential`, and `python` packages (useful for plugins that require native builds).
3333

34-
The image (tag **alpine** 58 MB) includes only Matterbridge, using the latest release published on npm. This image (**for test and development only**) is based on `node:24-alpine`. Plugins are not included in the image; they will be installed on first run.
34+
The image (tag **alpine** 58 MB) includes only Matterbridge, using the latest release published on npm. This image (**for test and development only**) is based on `node:24-alpine`. Plugins are not included in the image: they will be installed on first run.
3535

3636
### Matterbridge docker base images
3737

3838
The image (tag **24-ubuntu-slim** 86 MB) includes only `ubuntu:latest` -> Ubuntu 24.04.3 LTS (noble) with Node.js 24 from NodeSource. It is used to build the **ubuntu** image but can also be used to open a shell in ubuntu latest with node 24.
3939

40-
The image (tag **s6-rc** 84 MB) includes only Matterbridge, using the latest release published on npm. This image is based on `node:24-trixie-slim` and integrates the `s6-rc overlay` system. Plugins are not included in the image; they will be installed on first run. It is used for the [Matterbridge Home Assistant Application](https://github.com/Luligu/matterbridge-home-assistant-addon).
40+
The image (tag **s6-rc** 84 MB) includes only Matterbridge, using the latest release published on npm. This image is based on `node:24-trixie-slim` and integrates the `s6-rc overlay` system. Plugins are not included in the image: they will be installed on first run. It is used for the [Matterbridge Home Assistant Application](https://github.com/Luligu/matterbridge-home-assistant-addon).
4141

4242
### Docker health check
4343

docker/Dockerfile.24-ubuntu-slim

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG NODE_VERSION=24.13.0
1+
ARG NODE_VERSION=24.13.1
22

33
# ─────────────── NODE STAGE ───────────────
44
FROM ubuntu:latest AS node
@@ -35,10 +35,30 @@ FROM ubuntu:latest AS release
3535
# 🛠️ Set noninteractive frontend
3636
ENV DEBIAN_FRONTEND=noninteractive
3737

38+
# Copy Node.js from the node stage
3839
COPY --from=node /opt/node /opt/node
40+
41+
# Set environment variables for Node.js
3942
ENV PATH=/usr/local/bin:/opt/node/bin:$PATH
4043
ENV npm_config_prefix=/usr/local
4144

45+
# ---- Build arguments injected by CI ----
46+
ARG VERSION
47+
ARG VCS_REF
48+
ARG BUILD_DATE
49+
50+
# ---- OCI standard labels (https://opencontainers.org/) ----
51+
LABEL org.opencontainers.image.title="matterbridge" \
52+
org.opencontainers.image.description="Matterbridge plugin manager for Matter" \
53+
org.opencontainers.image.version=$VERSION \
54+
org.opencontainers.image.revision=$VCS_REF \
55+
org.opencontainers.image.source="git+https://github.com/Luligu/matterbridge.git" \
56+
org.opencontainers.image.url="https://matterbridge.io" \
57+
org.opencontainers.image.documentation="https://matterbridge.io/README.html" \
58+
org.opencontainers.image.licenses="Apache-2.0" \
59+
org.opencontainers.image.authors="Luligu <https://github.com/Luligu>" \
60+
org.opencontainers.image.created=$BUILD_DATE
61+
4262
RUN \
4363
apt-get update || (sleep 10 && apt-get update) || (sleep 20 && apt-get update) \
4464
&& apt-get install -y --no-install-recommends ca-certificates \

0 commit comments

Comments
 (0)