From 37e173a62ef906c3fd15592199c1a179279553d1 Mon Sep 17 00:00:00 2001 From: Louis Brunner Date: Tue, 30 Apr 2024 10:21:56 +0100 Subject: [PATCH 1/2] feat: add metadata to docker image --- .github/workflows/build-release.yaml | 5 +++-- Dockerfile | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index 25a6bcf..980e908 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -19,7 +19,7 @@ jobs: id: parse-tag build: - needs: [ get-tag ] + needs: [get-tag] strategy: matrix: arch: [amd64, arm64] @@ -42,13 +42,14 @@ jobs: with: image_name: aica-technology/network-interfaces image_tags: ${{ steps.merge-tags.outputs.list }} + build_flags: --build-arg VERSION=${{ needs.get-tag.outputs.tag }} dockerfile_path: Dockerfile token: ${{ secrets.GITHUB_TOKEN }} multi-arch: runs-on: ubuntu-latest name: Merge into a multi-arch image - needs: [ get-tag, build ] + needs: [get-tag, build] steps: - uses: aica-technology/.github/.github/actions/ghcr-manifest-merge@v0.6.1 with: diff --git a/Dockerfile b/Dockerfile index 0e2939d..07fc872 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG ROS2_VERSION=iron +ARG ROS2_VERSION=v1.0.0-iron FROM ghcr.io/aica-technology/ros2-ws:${ROS2_VERSION} as base USER ${USER} @@ -131,3 +131,10 @@ COPY --from=apt-dependencies /tmp/apt / COPY --from=install /tmp/communication-interfaces /usr COPY --from=python /tmp/python-usr /usr COPY --from=python-stubs /tmp/python-usr /usr + +ARG VERSION +ARG ROS2_VERSION +LABEL org.opencontainers.image.title="AICA network-interfaces library" +LABEL org.opencontainers.image.description="AICA network-interfaces library (for ${ROS2_VERSION})" +LABEL org.opencontainers.image.version="${VERSION}" +LABEL tech.aica.image.metadata='{"type":"lib","base":{"name":"@aica/foss/ros2-ws","version":"'${ROS2_VERSION}'"}}' From 49fc32b922b2f1b2f313d9bce9001f7eb8d5f9ab Mon Sep 17 00:00:00 2001 From: Louis Brunner Date: Tue, 30 Apr 2024 10:23:32 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28562b4..310eefa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Release Versions: ## Upcoming changes (in development) +- feat: add metadata to docker image (#73) - fix(build): copy library to /usr (#71) - build: copy python packages into /usr instead of ~ros2 to avoid permission issues (#69) - feat: add is_opened flag to socket base class (#68)