#!/bin/bash source "$(dirname $0)/vars" verify_app_name "$1" shopt -s nullglob cat if [[ "$2" == "web" ]] || [[ "$2" == "run" ]]; then while read VOLUME_APP; do VOLUME="$VOLUME_CONTAINER_PREFIX$(basename "$(dirname "$VOLUME_APP")")" echo "--volumes-from $VOLUME " docker inspect \ --format='{{range $container, $host := .Volumes}}{{printf "--volume=%q\n" (printf "%s:%s" $container $host)}}{{end}}' \ "$VOLUME" done < <(find "$VOLUME_ROOT" -type f -name "$APP") fi