Skip to content

Commit 4feb658

Browse files
committed
Transition from Label Schema to OCI labels
The Label Schema defined a common set for labels for docker images. Now the Open Container Initiative has defined labels under the org.opencontainers.image namespace, which are to replace the ones from Label Schema. https://github.com/opencontainers/image-spec/blob/main/annotations.md So we transition to the new OCI labels, keeping the old ones around for a period of time (like a year or so).
1 parent 5bd25b1 commit 4feb658

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

generate/Dockerfile.template

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,13 @@ LABEL maintainer="James Moger <james.moger@gitblit.com>, Florian Zschocke <f.zsc
261261
org.label-schema.name="gitblit" \
262262
org.label-schema.description="Gitblit is an open-source, pure Java stack for managing, viewing, and serving Git repositories." \
263263
org.label-schema.url="http://gitblit.com" \
264-
org.label-schema.version="${GITBLIT_VERSION}"
264+
org.label-schema.version="${GITBLIT_VERSION}" \
265+
org.opencontainers.image.title="gitblit" \
266+
org.opencontainers.image.description="Gitblit is an open-source, pure Java stack for managing, viewing, and serving Git repositories." \
267+
org.opencontainers.image.url="http://gitblit.com" \
268+
org.opencontainers.image.source="https://github.com/gitblit/gitblit-docker" \
269+
org.opencontainers.image.documentation="https://github.com/gitblit/gitblit-docker/blob/master/hub-readme.md" \
270+
org.opencontainers.image.version="${GITBLIT_VERSION}"
265271

266272

267273
ENV GITBLIT_VAR <% ${GITBLIT_VAR} %>

generate/generate_dockerfile.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,13 @@ printf "%s\n" LABEL\ maintainer=\"James\ Moger\ \<james.moger@gitblit.com\>\,\ F
253253
printf "%s\n" \ \ \ \ \ \ org.label-schema.name=\"gitblit\"\ \\
254254
printf "%s\n" \ \ \ \ \ \ org.label-schema.description=\"Gitblit\ is\ an\ open-source\,\ pure\ Java\ stack\ for\ managing\,\ viewing\,\ and\ serving\ Git\ repositories.\"\ \\
255255
printf "%s\n" \ \ \ \ \ \ org.label-schema.url=\"http://gitblit.com\"\ \\
256-
printf "%s\n" \ \ \ \ \ \ org.label-schema.version=\"\$\{GITBLIT_VERSION\}\"
256+
printf "%s\n" \ \ \ \ \ \ org.label-schema.version=\"\$\{GITBLIT_VERSION\}\"\ \\
257+
printf "%s\n" \ \ \ \ \ \ org.opencontainers.image.title=\"gitblit\"\ \\
258+
printf "%s\n" \ \ \ \ \ \ org.opencontainers.image.description=\"Gitblit\ is\ an\ open-source\,\ pure\ Java\ stack\ for\ managing\,\ viewing\,\ and\ serving\ Git\ repositories.\"\ \\
259+
printf "%s\n" \ \ \ \ \ \ org.opencontainers.image.url=\"http://gitblit.com\"\ \\
260+
printf "%s\n" \ \ \ \ \ \ org.opencontainers.image.source=\"https://github.com/gitblit/gitblit-docker\"\ \\
261+
printf "%s\n" \ \ \ \ \ \ org.opencontainers.image.documentation=\"https://github.com/gitblit/gitblit-docker/blob/master/hub-readme.md\"\ \\
262+
printf "%s\n" \ \ \ \ \ \ org.opencontainers.image.version=\"\$\{GITBLIT_VERSION\}\"
257263
printf "\n"
258264
printf "\n"
259265
printf "%s\n" ENV\ GITBLIT_VAR\ "${GITBLIT_VAR}"

0 commit comments

Comments
 (0)