[SPARK-40528] Support dockerfile template
### What changes were proposed in this pull request?
This patch:
- Add dockerfile template: `Dockerfile.template` contains 3 vars: `BASE_IMAGE` for base image name, `HAVE_PY` for adding python support, `HAVE_R` for adding sparkr support.
- Add a script: `add-dockerfiles.sh`, you can `./add-dockerfiles.sh 3.3.0`
- Add a tool: `tempalte.py` to help generate dockerfile from jinja template.
### Why are the changes needed?
Generate the dockerfiles to make life easier.
### Does this PR introduce _any_ user-facing change?
No, dev only.
### How was this patch tested?
```shell
# Prepare new env
python3 -m venv ~/xxx
pip install -r ./tools/requirements.txt
source ~/xxx/bin/activate
# Generate 3.3.0
./add-dockerfiles.sh 3.3.0
# no diff
git diff
```
lint:
```
$ flake8 ./tools/template.py
$ black ./tools/template.py
All done! ✨ 🍰 ✨
1 file left unchanged.
```
Closes #12 from Yikun/SPARK-40528.
Authored-by: Yikun Jiang <yikunkero@gmail.com>
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
5 files changed