-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-49243][INFRA][K8S] Add
OpenContainers
Annotations in docker …
…images ### What changes were proposed in this pull request? This PR aims to add `OpenContainers` Annotations to docker image to add metadata like `Apache License`. - https://specs.opencontainers.org/image-spec/annotations/ ### Why are the changes needed? **BEFORE** ``` $ docker inspect apache/spark:3.5.2 | jq '.[0].Config.Labels' { "org.opencontainers.image.ref.name": "ubuntu", "org.opencontainers.image.version": "20.04" } ``` **AFTER** ``` $ NO_MANUAL=1 ./dev/make-distribution.sh -Pkubernetes $ bin/docker-image-tool.sh -t SPARK-49243 -n build $ docker inspect spark:SPARK-49243 | jq '.[0].Config.Labels' { "org.opencontainers.image.authors": "Apache Spark project <devspark.apache.org>", "org.opencontainers.image.licenses": "Apache-2.0", "org.opencontainers.image.ref.name": "Apache Spark Scala/Java Image", "org.opencontainers.image.version": "" } ``` ### Does this PR introduce _any_ user-facing change? No, it's only a metadata change. ### How was this patch tested? Manual review. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47766 from dongjoon-hyun/SPARK-49243. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
- Loading branch information
1 parent
def42d4
commit 470e3f9
Showing
5 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,11 @@ | |
|
||
# Image for building Spark releases. Based on Ubuntu 22.04. | ||
FROM ubuntu:jammy-20240227 | ||
LABEL org.opencontainers.image.authors="Apache Spark project <[email protected]>" | ||
LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
LABEL org.opencontainers.image.ref.name="Apache Spark Release Manager Image" | ||
# Overwrite this label to avoid exposing the underlying Ubuntu OS version label | ||
LABEL org.opencontainers.image.version="" | ||
|
||
ENV FULL_REFRESH_DATE 20240318 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,11 @@ | |
# Image for building and testing Spark branches. Based on Ubuntu 22.04. | ||
# See also in https://hub.docker.com/_/ubuntu | ||
FROM ubuntu:jammy-20240227 | ||
LABEL org.opencontainers.image.authors="Apache Spark project <[email protected]>" | ||
LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
LABEL org.opencontainers.image.ref.name="Apache Spark Infra Image" | ||
# Overwrite this label to avoid exposing the underlying Ubuntu OS version label | ||
LABEL org.opencontainers.image.version="" | ||
|
||
ENV FULL_REFRESH_DATE 20240318 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,11 @@ | |
ARG java_image_tag=21 | ||
|
||
FROM azul/zulu-openjdk:${java_image_tag} | ||
LABEL org.opencontainers.image.authors="Apache Spark project <[email protected]>" | ||
LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
LABEL org.opencontainers.image.ref.name="Apache Spark Scala/Java Image" | ||
# Overwrite this label to avoid exposing the underlying Ubuntu OS version label | ||
LABEL org.opencontainers.image.version="" | ||
|
||
ARG spark_uid=185 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,11 @@ | |
ARG base_img | ||
|
||
FROM ${base_img:-spark} | ||
LABEL org.opencontainers.image.authors="Apache Spark project <[email protected]>" | ||
LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
LABEL org.opencontainers.image.ref.name="Apache Spark R Image" | ||
# Overwrite this label to avoid exposing the underlying Ubuntu OS version label | ||
LABEL org.opencontainers.image.version="" | ||
WORKDIR / | ||
|
||
# Reset to root to run installation tasks | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,11 @@ | |
ARG base_img | ||
|
||
FROM ${base_img:-spark} | ||
LABEL org.opencontainers.image.authors="Apache Spark project <[email protected]>" | ||
LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
LABEL org.opencontainers.image.ref.name="Apache Spark Python Image" | ||
# Overwrite this label to avoid exposing the underlying Ubuntu OS version label | ||
LABEL org.opencontainers.image.version="" | ||
WORKDIR / | ||
|
||
# Reset to root to run installation tasks | ||
|