Skip to content

Commit 73e1437

Browse files
committed
Add TASK_BUILD_ARGS
Signed-off-by: Daniel Nephin <dnephin@docker.com>
1 parent 1916ed9 commit 73e1437

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tasks

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ linter_image="docker-cli-lint:$unique_id"
88
cross_image="docker-cli-cross:$unique_id"
99
shellcheck_image="docker-cli-shellcheck:$unique_id"
1010

11+
TASK_BUILD_ARGS=${TASK_BUILD_ARGS:-}
12+
1113
function run_task {
1214
local task=$1
1315

@@ -56,8 +58,16 @@ function docker_build_and_run {
5658
remove=
5759
fi
5860

59-
echo "$dockerfile_source" | docker build -t "$image" -f "$dockerfile" .
60-
docker run $remove $envvars $cidfile $use_tty ${mounts[@]+"${mounts[@]}"} "$image" $cmd
61+
echo "$dockerfile_source" | \
62+
docker build $TASK_BUILD_ARGS -t "$image" -f "$dockerfile" .
63+
docker run \
64+
$remove \
65+
$envvars \
66+
$cidfile \
67+
$use_tty \
68+
${mounts[@]+"${mounts[@]}"} \
69+
"$image" \
70+
$cmd
6171
}
6272

6373
function usage {

0 commit comments

Comments
 (0)