You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/07/14 05:52:28 UTC
[08/12] flink git commit: [hotfix] Support building a job image from
a Flink archive
[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.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/134e0444
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/134e0444
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/134e0444
Branch: refs/heads/master
Commit: 134e04442dc9506b698b8c1815c11a253c8b7cc5
Parents: 387a3bc
Author: Till Rohrmann <tr...@apache.org>
Authored: Wed Jul 11 16:13:30 2018 +0200
Committer: Till Rohrmann <tr...@apache.org>
Committed: Fri Jul 13 18:11:06 2018 +0200
----------------------------------------------------------------------
flink-container/docker/build.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/134e0444/flink-container/docker/build.sh
----------------------------------------------------------------------
diff --git a/flink-container/docker/build.sh b/flink-container/docker/build.sh
index 13a536c..614a9c3 100755
--- a/flink-container/docker/build.sh
+++ b/flink-container/docker/build.sh
@@ -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