[KYUUBI #6166] [MINOR] Fix wrong copy path about SPARK_HOME in docker

# 🔍 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 🔖

- [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 ⚰️

#### Behavior With This Pull Request 🎉

#### 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 <yanghua1127@gmail.com>
Signed-off-by: zwangsheng <binjieyang@apache.org>
This commit is contained in:
yanghua 2024-03-12 13:46:45 +08:00 committed by zwangsheng
parent ddf347ff77
commit f2cfeb1737

View File

@ -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