From 3cd65aba5010eccd9c78454d63827df86efeeebe Mon Sep 17 00:00:00 2001 From: Myers Carpenter Date: Tue, 8 Jan 2019 14:27:14 -0500 Subject: [PATCH] add support for dockerfile build target --- plugin.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin.sh b/plugin.sh index 75ec6d2..b7e1088 100755 --- a/plugin.sh +++ b/plugin.sh @@ -22,6 +22,10 @@ DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile} CONTEXT=${PLUGIN_CONTEXT:-$PWD} LOG=${PLUGIN_LOG:-info} +if [[ -n "${PLUGIN_TARGET:-}" ]]; then + TARGET="--target=${PLUGIN_TARGET}" +fi + if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then CACHE="--cache=true" fi @@ -41,4 +45,5 @@ fi --dockerfile=${DOCKERFILE} \ ${DESTINATIONS} \ ${CACHE:-} \ + ${TARGET:-} \ ${BUILD_ARGS:-}