This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new f875ec8  [SPARK-49168] Add `OpenContainers` Annotations to docker image
f875ec8 is described below

commit f875ec8b96945ff7b4f763dc1898469d604ac519
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Aug 8 16:02:19 2024 -0700

    [SPARK-49168] Add `OpenContainers` Annotations to docker image
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add `OpenContainers` Annotations to docker image.
    
    - https://specs.opencontainers.org/image-spec/annotations/
    
    ### Why are the changes needed?
    
    **AFTER**
    ```
    $ docker inspect spark-kubernetes-operator:0.1.0 | 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 Kubernetes Operator",
      "org.opencontainers.image.version": "0.1.0"
    }
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manual review.
    ```
    $ docker build --build-arg APP_VERSION=0.1.0 -t 
spark-kubernetes-operator:0.1.0 -f build-tools/docker/Dockerfile .
    $ docker inspect spark-kubernetes-operator:0.1.0 | jq '.[0].Config.Labels'
    ```
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #43 from dongjoon-hyun/SPARK-49168.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 build-tools/docker/Dockerfile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/build-tools/docker/Dockerfile b/build-tools/docker/Dockerfile
index ad731ba..aec9aca 100644
--- a/build-tools/docker/Dockerfile
+++ b/build-tools/docker/Dockerfile
@@ -23,6 +23,10 @@ RUN ./gradlew clean build -x test
 FROM azul/zulu-openjdk:21
 ARG APP_VERSION
 ARG SPARK_UID=185
+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 Kubernetes Operator"
+LABEL org.opencontainers.image.version="${APP_VERSION}"
 
 ENV SPARK_OPERATOR_HOME=/opt/spark-operator
 ENV SPARK_OPERATOR_WORK_DIR=/opt/spark-operator/operator


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to