mirror of
https://github.com/netdata/netdata.git
synced 2025-04-09 23:57:55 +00:00
Add oci meta info (#19839)
* Update CI with OCI Meta information * Add OCI Meta information to Dockerfile * Add BUILD_DATE
This commit is contained in:
parent
a8c738c7d7
commit
35214fd7ac
2 changed files with 18 additions and 3 deletions
17
.github/workflows/docker.yml
vendored
17
.github/workflows/docker.yml
vendored
|
@ -213,6 +213,8 @@ jobs:
|
|||
build-args: |
|
||||
OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
|
||||
EXTRA_INSTALL_OPTS=${{ needs.file-check.outputs.skip-go }}
|
||||
BUILD_VERSION=test
|
||||
BUILD_DATE=${{ github.event.repository.updated_at }}
|
||||
- name: Test Image
|
||||
id: test
|
||||
if: needs.file-check.outputs.run == 'true' && matrix.platform == 'linux/amd64'
|
||||
|
@ -322,7 +324,10 @@ jobs:
|
|||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=local,src=/tmp/build-cache
|
||||
outputs: type=image,name=netdata/netdata,push-by-digest=true,name-canonical=true,push=true
|
||||
build-args: OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
|
||||
build-args: |
|
||||
OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
|
||||
BUILD_VERSION=${{ github.event.inputs.version }}
|
||||
BUILD_DATE=${{ github.event.repository.updated_at }}
|
||||
- name: Export Digest
|
||||
id: export-digest
|
||||
if: github.repository == 'netdata/netdata'
|
||||
|
@ -471,7 +476,10 @@ jobs:
|
|||
with:
|
||||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=local,src=/tmp/build-cache
|
||||
build-args: OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
|
||||
build-args: |
|
||||
OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
|
||||
BUILD_VERSION=${{ github.event.inputs.version }}
|
||||
BUILD_DATE=${{ github.event.repository.updated_at }}
|
||||
outputs: type=image,name=quay.io/netdata/netdata,push-by-digest=true,name-canonical=true,push=true
|
||||
- name: Export Digest
|
||||
id: export-digest
|
||||
|
@ -622,7 +630,10 @@ jobs:
|
|||
with:
|
||||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=local,src=/tmp/build-cache
|
||||
build-args: OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
|
||||
build-args: |
|
||||
OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
|
||||
BUILD_VERSION=${{ github.event.inputs.version }}
|
||||
BUILD_DATE=${{ github.event.repository.updated_at }}
|
||||
outputs: type=image,name=ghcr.io/netdata/netdata,push-by-digest=true,name-canonical=true,push=true
|
||||
- name: Export Digest
|
||||
id: export-digest
|
||||
|
|
|
@ -61,6 +61,8 @@ RUN mkdir -p /app/usr/sbin/ \
|
|||
# hadolint ignore=DL3007
|
||||
FROM netdata/base:v2 AS base
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_VERSION
|
||||
LABEL org.opencontainers.image.authors="Netdatabot <bot@netdata.cloud>"
|
||||
LABEL org.opencontainers.image.url="https://netdata.cloud"
|
||||
LABEL org.opencontainers.image.documentation="https://learn.netdata.cloud"
|
||||
|
@ -68,6 +70,8 @@ LABEL org.opencontainers.image.source="https://github.com/netdata/netdata"
|
|||
LABEL org.opencontainers.image.title="Netdata Agent"
|
||||
LABEL org.opencontainers.image.description="Official Netdata Agent Docker Image"
|
||||
LABEL org.opencontainers.image.vendor="Netdata Inc."
|
||||
LABEL org.opencontainers.image.created=${BUILD_DATE}
|
||||
LABEL org.opencontainers.image.version=${BUILD_VERSION}
|
||||
|
||||
ARG OFFICIAL_IMAGE=false
|
||||
ENV NETDATA_OFFICIAL_IMAGE=$OFFICIAL_IMAGE
|
||||
|
|
Loading…
Add table
Reference in a new issue