From f2cfeb17378bee58e96473c329b8da4e4b8575b0 Mon Sep 17 00:00:00 2001 From: yanghua Date: Tue, 12 Mar 2024 13:46:45 +0800 Subject: [PATCH] [KYUUBI #6166] [MINOR] Fix wrong copy path about SPARK_HOME in docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # :mag: Description ## Issue References ๐Ÿ”— This pull request fixes # ## Describe Your Solution ๐Ÿ”ง After running `build/dist`, the old structure is like `dist/spark-binary/spark-3.4.2-bin-hadoop3/xxx`. In `Dockerfile`, after the command `ONBUILD COPY spark-binary ${SPARK_HOME}` takes effect. The path in the container is `/opt/spark/spark-3.4.2-bin-hadoop3`. So I suggest only copy the content of the origin spark binary, making the structure looks like `dist/spark-binary/xxx`. Finally, the path in the container (`/opt/spark/xxx`) should be correct. ## Types of changes :bookmark: - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan ๐Ÿงช #### Behavior Without This Pull Request :coffin: #### Behavior With This Pull Request :tada: #### Related Unit Tests --- # Checklist ๐Ÿ“ - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6166 from yanghua/docker-minor. Closes #6166 3946a5390 [yanghua] Fix wrong copy path about SPARK_HOME in docker Authored-by: yanghua Signed-off-by: zwangsheng --- bin/docker-image-tool.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/docker-image-tool.sh b/bin/docker-image-tool.sh index e85b9a543..2412f39c7 100755 --- a/bin/docker-image-tool.sh +++ b/bin/docker-image-tool.sh @@ -110,7 +110,7 @@ function build { error "Cannot found dir SPARK_HOME $SPARK_HOME, you must configure SPARK_HOME correct." fi fi - cp -r "$SPARK_HOME/" "$KYUUBI_ROOT/spark-binary/" + cp -r "$SPARK_HOME/." "$KYUUBI_ROOT/spark-binary/" fi # Verify that the Docker image content directory is present