[hotfix] Support building a job image from a Flink archive

Extend the flink-container/docker/build.sh script to also accept a Flink archive to build
the image from. This makes it easier to build an image from one of the convenience releases.
上级 387a3bc1
......@@ -21,6 +21,7 @@ usage() {
cat <<HERE
Usage:
build.sh --job-jar <path-to-job-jar> --from-local-dist [--image-name <image>]
build.sh --job-jar <path-to-job-jar> --from-archive <path-to-dist-archive> [--image-name <image>]
build.sh --job-jar <path-to-job-jar> --from-release --flink-version <x.x.x> --hadoop-version <x.x> --scala-version <x.xx> [--image-name <image>]
build.sh --help
......@@ -35,10 +36,15 @@ key="$1"
case $key in
--job-jar)
JOB_JAR_PATH="$2"
shift
;;
--from-local-dist)
FROM_LOCAL="true"
;;
--from-archive)
FROM_ARCHIVE="$2"
shift
;;
--from-release)
FROM_RELEASE="true"
;;
......@@ -107,6 +113,10 @@ elif [ -n "${FROM_LOCAL}" ]; then
echo "Using flink dist: ${DIST_DIR}"
tar -C ${DIST_DIR} -cvzf "${FLINK_DIST}" .
elif [ -n "${FROM_ARCHIVE}" ]; then
FLINK_DIST="${TMPDIR}/flink.tgz"
cp "${FROM_ARCHIVE}" "${FLINK_DIST}"
else
usage
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册