Skip to content

refactor: update metadata labels #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions 10/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:20.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 10

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apt-get update \
&& apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
&& ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
Expand Down
13 changes: 10 additions & 3 deletions 11-alpine-3.18/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM alpine:3.18

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"
ENV CLANG_VERSION 11

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apk update \
&& apk add --no-cache clang-extra-tools \
Expand Down
13 changes: 9 additions & 4 deletions 11/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:22.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 11

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apt-get update \
&& apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
&& ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
Expand Down
13 changes: 10 additions & 3 deletions 12-alpine-3.18/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM alpine:3.18

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"
ENV CLANG_VERSION 12

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apk update \
&& apk add --no-cache clang-extra-tools \
Expand Down
13 changes: 9 additions & 4 deletions 12/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:22.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 12

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apt-get update \
&& apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
&& ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
Expand Down
13 changes: 9 additions & 4 deletions 13/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:22.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 13

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN mv /etc/apt/sources.list /etc/apt/sources.list.focal

COPY sources.list.jammy /etc/apt/sources.list
Expand Down
13 changes: 9 additions & 4 deletions 14/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:22.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 14

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN mv /etc/apt/sources.list /etc/apt/sources.list.focal

COPY sources.list.jammy /etc/apt/sources.list
Expand Down
13 changes: 9 additions & 4 deletions 15/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:22.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 15

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN mv /etc/apt/sources.list /etc/apt/sources.list.focal

COPY sources.list.kinetic /etc/apt/sources.list
Expand Down
13 changes: 9 additions & 4 deletions 16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:22.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 16

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

WORKDIR /src

RUN apt-get update \
Expand Down
13 changes: 9 additions & 4 deletions 6/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:20.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 6.0

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apt-get update \
&& apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
&& ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
Expand Down
13 changes: 9 additions & 4 deletions 7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:20.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 7

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apt-get update \
&& apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
&& ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
Expand Down
13 changes: 9 additions & 4 deletions 8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:20.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 8

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apt-get update \
&& apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
&& ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
Expand Down
13 changes: 9 additions & 4 deletions 9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
FROM ubuntu:20.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSION 9

LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:${CLANG_VERSION}" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

RUN apt-get update \
&& apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
&& ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ CONTAINER_BIN ?= docker

## Image metadatas
COMMIT_SHA ?= =$(shell git rev-parse HEAD)
GIT_SCM_URL ?= $(shell git config --get remote.origin.url)
BUILD_DATE ?= $(shell date --utc '+%Y-%m-%dT%H:%M:%S' 2>/dev/null || gdate --utc '+%Y-%m-%dT%H:%M:%S')

check-file:
ifeq ($(FILE), unknow)
Expand Down Expand Up @@ -56,9 +54,7 @@ build: check-file lint ## ## Build the Docker Image $(NAME) from $(DOCKERFILE)
@echo "== Building $(IMAGE_NAME) from $(DOCKERFILE)..."
@$(CONTAINER_BIN) build \
-t $(IMAGE_NAME) \
--label "image.source=$(GIT_SCM_URL)" \
--label "image.revision=$(COMMIT_SHA)" \
--label "image.created=$(BUILD_DATE)" \
--label "org.opencontainers.image.revision=$(COMMIT_SHA)" \
-f $(DOCKERFILE) \
$(DIR_NAME)
@echo "== Build ✅ image $(IMAGE_NAME) Succeeded."
Expand Down
11 changes: 8 additions & 3 deletions all/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM ubuntu:20.04

LABEL org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker"
LABEL org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy."
LABEL org.opencontainers.image.licenses="MIT"
LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Unofficial Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:all" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"

ENV CLANG_VERSIONS="12 11 10 9 8"

Expand Down