Skip to content

Commit

Permalink
[hotfix] Support building a job image from a Flink archive
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tillrohrmann committed Jul 13, 2018
1 parent 387a3bc commit 134e044
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions flink-container/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
;;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 134e044

Please sign in to comment.