Compare commits

...

5 Commits

  1. 6
      Dockerfile
  2. 6
      bin/compose
  3. 24
      bin/compose-core

6
Dockerfile

@ -102,6 +102,12 @@ RUN apk add openssl
## requiring ``htpasswd`` command for BCrypt encryption
RUN apk add apache2-utils
## required by git through ssh (for host-resources for instance)
RUN apk add openssh-client
## required for acl write management (for apache data dirs for instance)
RUN apk add acl
## install compose
COPY ./bin/ /usr/local/bin/

6
bin/compose

@ -167,6 +167,12 @@ mk_docker_run_options() {
docker_run_opts+=("-v" "$HOME/.docker:/root/.docker")
## SSH config
docker_run_opts+=(
"-v" "/root/.ssh:/root/.ssh:ro"
"-v" "/etc/ssh:/etc/ssh"
)
COMPOSE_LAUNCHER_BIN=$(readlink -f "${BASH_SOURCE[0]}")
filename=$(mktemp -p /tmp/ -t launch_opts-XXXXXXXXXXXXXXXX)

24
bin/compose-core

@ -1634,7 +1634,7 @@ setup_host_resources () {
## requirements.
continue
fi
setup_host_resource "$service"
setup_host_resource "$subservice" || return 1
loaded[$subservice]=1
done
done
@ -1716,6 +1716,13 @@ yaml_get_interpret() {
return 1
}
;;
"!file-content")
source=$(echo "$content" | expand_vars) || {
err "shell expansion failed"
return 1
}
cat "$source" || return 1
;;
*)
err "Invalid object tag ${WHITE}$tag${NORMAL}"
return 1
@ -2851,7 +2858,7 @@ _get_master_service_for_service_cached () {
fi
## Action provided by relation ?
container_relation=$(_get_container_relation "$metadata")
container_relation=$(_get_container_relation "$metadata") || exit 1
read-0 target_service _ _ < <(get_service_relation "$service" "$container_relation")
if [ -z "$target_service" ]; then
err "Couldn't find ${WHITE}relations.${container_relation}${NORMAL} in" \
@ -4032,12 +4039,15 @@ get_all_relations "${services_args[@]}" >/dev/null || exit 1
if [ "$is_docker_compose_action" -a "${#services_args[@]}" -gt 0 ]; then
services=($(get_master_services "${services_args[@]}")) || exit 1
if [ "$action" == "up" ]; then
## remove run-once
declare -A seen
for service in $(get_ordered_service_dependencies "${services_args[@]}"); do
type="$(get_service_type "$service")" || exit 1
if [ "$type" != "run-once" ]; then
action_posargs+=("$service")
fi
mservice=$(get_master_service_for_service "$service")
[ "${seen[$mservice]}" ] && continue
type="$(get_service_type "$mservice")" || exit 1
## remove run-once
[ "$type" == "run-once" ] && continue
seen[$mservice]=1
action_posargs+=("$mservice")
done
else
action_posargs+=("${services[@]}")

Loading…
Cancel
Save