#!/usr/bin/env bash # runOnDocker SERVICE runOnDocker() { if [[ $DOCKER_CONTAINER -ne 1 ]]; then echo "On Host. Executing command on container" docker-compose exec -T $1 $0 exit $? fi } export -f runOnDocker