Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull images included within compose service definitions prior to terr… #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion bin/dock
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,22 @@ 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")

pull_cmd="${pull_args[@]}"
docker exec $container_name bash -c "\
# change directory to temporary workspace
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more reasonable comment here

cd $tmp_workspace;
# pull compose service images
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment and convert to: cd $tmp_workspace && $pull_cmd

$pull_cmd"

# Only start services which have been defined as startup services by composed
# projects
local services="$(get_label_value $container_name startup_services)"
compose_args+=("up" "--build" "-d" "$services")
compose_args+=("up" "-d" "$services")

info "Terraforming and recomposing Dock environment..."
# Purge all existing containers within Dock environment
Expand Down