From 85e482fe3925b2e4447d0c4c0115313344a08d3f Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 22 Jul 2018 22:51:42 -0500 Subject: [PATCH] expand env var overrides --- run.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/run.sh b/run.sh index a5df50a..e80aef9 100755 --- a/run.sh +++ b/run.sh @@ -64,8 +64,10 @@ run_embark_docker () { fi fi - local EMBARK_DOCKER_TAG="${EMBARK_DOCKER_TAG:-latest}" - local EMBARK_DOCKER_MOUNT_DIR="${EMBARK_DOCKER_MOUNT_DIR:-$(pwd)}" + local EMBARK_DOCKER_MOUNT_SOURCE=${EMBARK_DOCKER_MOUNT_DIR:-$(pwd)} + local EMBARK_DOCKER_MOUNT_TARGET=${EMBARK_DOCKER_MOUNT_DIR:-/dapp} + local EMBARK_DOCKER_IMAGE=${EMBARK_DOCKER_IMAGE:-statusim/embark} + local EMBARK_DOCKER_TAG=${EMBARK_DOCKER_TAG:-latest} docker run \ -it \ @@ -79,8 +81,8 @@ run_embark_docker () { -p 8556:8556 \ -p 30301:30301/udp \ -p 30303:30303 \ - -v "$EMBARK_DOCKER_MOUNT_DIR":/dapp \ - statusim/embark:"$EMBARK_DOCKER_TAG" \ + -v ${EMBARK_DOCKER_MOUNT_SOURCE}:${EMBARK_DOCKER_MOUNT_TARGET} \ + ${EMBARK_DOCKER_IMAGE}:${EMBARK_DOCKER_TAG} \ "$@" local docker_exit_status=$?