Browse Source

new: ``compose up`` now includes ``--remove-orphans`` by default.

hostresources
Valentin Lab 6 years ago
parent
commit
344977802e
  1. 10
      bin/compose-core

10
bin/compose-core

@ -3661,10 +3661,14 @@ export SERVICE_PACK="${services_args[*]}"
case "$action" in case "$action" in
up|start|stop|build|run) up|start|stop|build|run)
## force daemon mode for up ## force daemon mode for up
if [[ "$action" == "up" ]] && ! array_member action_opts -d; then
action_opts+=("-d")
if [[ "$action" == "up" ]]; then
if ! array_member action_opts -d; then
action_opts+=("-d")
fi
if ! array_member action_opts --remove-orphans; then
action_opts+=("--remove-orphans")
fi
fi fi
launch_docker_compose "${compose_opts[@]}" "$action" "${action_opts[@]}" "${action_posargs[@]}" "${remainder_args[@]}" launch_docker_compose "${compose_opts[@]}" "$action" "${action_opts[@]}" "${action_posargs[@]}" "${remainder_args[@]}"
;; ;;
logs) logs)

Loading…
Cancel
Save