Skip to content

Commit

Permalink
Pull images included within compose service definitions prior to terr…
Browse files Browse the repository at this point in the history
…aform

Ensure all images included within constructed `docker-compose` command
are pulled in parallel prior to stand-up.

[OF6-1396]
  • Loading branch information
0xOI committed Dec 6, 2018
1 parent f969aac commit b0c8c92
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/dock
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,16 @@ terraform_container() {
docker-compose config > ${tmp_workspace}/$output_file"
compose_args+=("--file" "$output_file")
done

# Download all images included within compose service definitions in parallel
pull_args=("${compose_args[@]}")
pull_args+=("pull" "--parallel")
if quiet; then
pull_args+=("--quiet")
fi
pull_cmd="${pull_args[@]}"
docker exec $container_name "$pull_cmd"

# Only start services which have been defined as startup services by composed
# projects
local services="$(get_label_value $container_name startup_services)"
Expand Down

0 comments on commit b0c8c92

Please sign in to comment.