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/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new 44b8cc62f ORC-2073: Fix `JSONArgsRecommended` warnings of `Dockerfile`
44b8cc62f is described below

commit 44b8cc62fbd0d2961261d7ee923b6961dcfb48d5
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Feb 2 10:14:57 2026 -0800

    ORC-2073: Fix `JSONArgsRecommended` warnings of `Dockerfile`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix `JSONArgsRecommended` warnings from all `Dockerfile`s.
    
    ### Why are the changes needed?
    
    This is the official recommendation. We had better follow.
    - https://docs.docker.com/reference/build-checks/json-args-recommended/
    
    ```
    ENTRYPOINT and CMD instructions both support two different syntaxes for 
arguments:
    Shell form: CMD my-cmd start
    Exec form: CMD ["my-cmd", "start"]
    ```
    
    ### How was this patch tested?
    
    Manual review.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Yes (`Opus 4.5` on `Claude Code v2.1.5`)
    
    Closes #2508 from dongjoon-hyun/ORC-2073.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 docker/amazonlinux23/Dockerfile | 10 +---------
 docker/debian12/Dockerfile      | 10 +---------
 docker/debian13/Dockerfile      | 10 +---------
 docker/oraclelinux10/Dockerfile | 10 +---------
 docker/oraclelinux9/Dockerfile  | 10 +---------
 docker/ubuntu22/Dockerfile      | 10 +---------
 docker/ubuntu24/Dockerfile      | 10 +---------
 site/Dockerfile                 |  2 +-
 8 files changed, 8 insertions(+), 64 deletions(-)

diff --git a/docker/amazonlinux23/Dockerfile b/docker/amazonlinux23/Dockerfile
index a1e82a81c..d0f2bbbd7 100644
--- a/docker/amazonlinux23/Dockerfile
+++ b/docker/amazonlinux23/Dockerfile
@@ -51,12 +51,4 @@ ENV TZ=America/Los_Angeles
 WORKDIR /root
 VOLUME /root/.m2/repository
 
-CMD if [ ! -d orc ]; then \
-      echo "No volume provided, building from apache main."; \
-      echo "Pass '-v`pwd`:/root/orc' to docker run to build local source."; \
-      git clone https://github.com/apache/orc.git -b main; \
-    fi && \
-    mkdir build && \
-    cd build && \
-    cmake ../orc && \
-    make package test-out
+CMD ["/bin/bash", "-c", "if [ ! -d orc ]; then echo \"No volume provided, 
building from apache main.\"; echo \"Pass '-v`pwd`:/root/orc' to docker run to 
build local source.\"; git clone https://github.com/apache/orc.git -b main; fi 
&& mkdir build && cd build && cmake ../orc && make package test-out"]
diff --git a/docker/debian12/Dockerfile b/docker/debian12/Dockerfile
index ae341183f..2b39554e1 100644
--- a/docker/debian12/Dockerfile
+++ b/docker/debian12/Dockerfile
@@ -41,12 +41,4 @@ WORKDIR /root
 
 VOLUME /root/.m2/repository
 
-CMD if [ ! -d orc ]; then \
-      echo "No volume provided, building from apache main."; \
-      echo "Pass '-v`pwd`:/root/orc' to docker run to build local source."; \
-      git clone https://github.com/apache/orc.git -b main; \
-    fi && \
-    mkdir build && \
-    cd build && \
-    cmake ../orc && \
-    make package test-out
+CMD ["/bin/bash", "-c", "if [ ! -d orc ]; then echo \"No volume provided, 
building from apache main.\"; echo \"Pass '-v`pwd`:/root/orc' to docker run to 
build local source.\"; git clone https://github.com/apache/orc.git -b main; fi 
&& mkdir build && cd build && cmake ../orc && make package test-out"]
diff --git a/docker/debian13/Dockerfile b/docker/debian13/Dockerfile
index 859f9b1d5..32cd8d1f1 100644
--- a/docker/debian13/Dockerfile
+++ b/docker/debian13/Dockerfile
@@ -41,12 +41,4 @@ WORKDIR /root
 
 VOLUME /root/.m2/repository
 
-CMD if [ ! -d orc ]; then \
-      echo "No volume provided, building from apache main."; \
-      echo "Pass '-v`pwd`:/root/orc' to docker run to build local source."; \
-      git clone https://github.com/apache/orc.git -b main; \
-    fi && \
-    mkdir build && \
-    cd build && \
-    cmake ../orc && \
-    make package test-out
+CMD ["/bin/bash", "-c", "if [ ! -d orc ]; then echo \"No volume provided, 
building from apache main.\"; echo \"Pass '-v`pwd`:/root/orc' to docker run to 
build local source.\"; git clone https://github.com/apache/orc.git -b main; fi 
&& mkdir build && cd build && cmake ../orc && make package test-out"]
diff --git a/docker/oraclelinux10/Dockerfile b/docker/oraclelinux10/Dockerfile
index 54558b916..671f40d03 100644
--- a/docker/oraclelinux10/Dockerfile
+++ b/docker/oraclelinux10/Dockerfile
@@ -32,12 +32,4 @@ RUN dnf install -y \
 WORKDIR /root
 VOLUME /root/.m2/repository
 
-CMD if [ ! -d orc ]; then \
-      echo "No volume provided, building from apache main."; \
-      echo "Pass '-v`pwd`:/root/orc' to docker run to build local source."; \
-      git clone https://github.com/apache/orc.git -b main; \
-    fi && \
-    mkdir build && \
-    cd build && \
-    cmake ../orc && \
-    make package test-out
+CMD ["/bin/bash", "-c", "if [ ! -d orc ]; then echo \"No volume provided, 
building from apache main.\"; echo \"Pass '-v`pwd`:/root/orc' to docker run to 
build local source.\"; git clone https://github.com/apache/orc.git -b main; fi 
&& mkdir build && cd build && cmake ../orc && make package test-out"]
diff --git a/docker/oraclelinux9/Dockerfile b/docker/oraclelinux9/Dockerfile
index 4f4c628c2..970f2d973 100644
--- a/docker/oraclelinux9/Dockerfile
+++ b/docker/oraclelinux9/Dockerfile
@@ -44,12 +44,4 @@ ENV TZ=America/Los_Angeles
 WORKDIR /root
 VOLUME /root/.m2/repository
 
-CMD if [ ! -d orc ]; then \
-      echo "No volume provided, building from apache main."; \
-      echo "Pass '-v`pwd`:/root/orc' to docker run to build local source."; \
-      git clone https://github.com/apache/orc.git -b main; \
-    fi && \
-    mkdir build && \
-    cd build && \
-    cmake ../orc && \
-    make package test-out
+CMD ["/bin/bash", "-c", "if [ ! -d orc ]; then echo \"No volume provided, 
building from apache main.\"; echo \"Pass '-v`pwd`:/root/orc' to docker run to 
build local source.\"; git clone https://github.com/apache/orc.git -b main; fi 
&& mkdir build && cd build && cmake ../orc && make package test-out"]
diff --git a/docker/ubuntu22/Dockerfile b/docker/ubuntu22/Dockerfile
index 03863f20a..acd7150e7 100644
--- a/docker/ubuntu22/Dockerfile
+++ b/docker/ubuntu22/Dockerfile
@@ -57,12 +57,4 @@ ENV CXX=c++
 WORKDIR /root
 VOLUME /root/.m2/repository
 
-CMD if [ ! -d orc ]; then \
-      echo "No volume provided, building from apache main."; \
-      echo "Pass '-v`pwd`:/root/orc' to docker run to build local source."; \
-      git clone https://github.com/apache/orc.git -b main; \
-    fi && \
-    mkdir build && \
-    cd build && \
-    cmake ../orc && \
-    make package test-out
+CMD ["/bin/bash", "-c", "if [ ! -d orc ]; then echo \"No volume provided, 
building from apache main.\"; echo \"Pass '-v`pwd`:/root/orc' to docker run to 
build local source.\"; git clone https://github.com/apache/orc.git -b main; fi 
&& mkdir build && cd build && cmake ../orc && make package test-out"]
diff --git a/docker/ubuntu24/Dockerfile b/docker/ubuntu24/Dockerfile
index 00cd2d67e..4f9fb1366 100644
--- a/docker/ubuntu24/Dockerfile
+++ b/docker/ubuntu24/Dockerfile
@@ -59,12 +59,4 @@ RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles 
/usr/share/zoneinfo/US/Pacifi
 WORKDIR /root
 VOLUME /root/.m2/repository
 
-CMD if [ ! -d orc ]; then \
-      echo "No volume provided, building from apache main."; \
-      echo "Pass '-v`pwd`:/root/orc' to docker run to build local source."; \
-      git clone https://github.com/apache/orc.git -b main; \
-    fi && \
-    mkdir build && \
-    cd build && \
-    cmake ../orc && \
-    make package test-out
+CMD ["/bin/bash", "-c", "if [ ! -d orc ]; then echo \"No volume provided, 
building from apache main.\"; echo \"Pass '-v`pwd`:/root/orc' to docker run to 
build local source.\"; git clone https://github.com/apache/orc.git -b main; fi 
&& mkdir build && cd build && cmake ../orc && make package test-out"]
diff --git a/site/Dockerfile b/site/Dockerfile
index a2a26a285..eaaffaa1c 100644
--- a/site/Dockerfile
+++ b/site/Dockerfile
@@ -50,5 +50,5 @@ USER orc
 WORKDIR /home/orc/site
 
 EXPOSE 4000
-CMD bundle exec jekyll serve -H 0.0.0.0
+CMD ["bundle", "exec", "jekyll", "serve", "-H", "0.0.0.0"]
 

Reply via email to