pegleg/tools/pegleg.sh
Anderson, Craig (ca846m) 83300a3da3 Simplify pegleg.sh usage
Remove unused code. Set WORKSPACE default to $PWD and set workdir in the
container, so that users of pegleg.sh do not need to have any knowledge of
the internal "/worksapce" mountpath inside the container, and in general
simplify the execution of container command line tools.

Change-Id: I56dea7d116f88df303aaeca8dc25a7b24cb291a6
2018-06-22 16:00:09 -07:00

22 lines
511 B
Bash
Executable File

#!/usr/bin/env bash
set -e
: ${WORKSPACE:=$(pwd)}
: ${IMAGE:=artifacts-aic.atlantafoundry.com/att-comdev/pegleg:latest}
echo
echo "== NOTE: Workspace $WORKSPACE is the execution directory in the container =="
echo
# Working directory inside container to execute commands from and mount from
# host OS
container_workspace_path='/workspace'
docker run --rm -t \
--net=none \
--workdir="$container_workspace_path" \
-v "${WORKSPACE}:$container_workspace_path" \
"${IMAGE}" \
pegleg "${@}"