#!/bin/sh set -e # Check if we've been told to run the command in Docker Composer. cmd="$@"; [ "$#" -eq 0 ] && cmd=bash export VOLUME="$appdir:/app" image=${DOCKER_IMAGE:=web} port_publish=""; [ "${BIND_DOCKER_SERVICE_PORTS:-}" = 1 ] && port_publish="--service-ports" exec docker-compose run $port_publish --rm $image $cmd