spyglass/tools/spyglass.sh
Alexander Hughes 56e37ed5c9 Update Spyglass make images command
Bring files used in make images in line with other airship projects

Change-Id: Idb1858e3bc8fa64cfbeb768d999066cbd832e698
2019-04-24 12:03:32 -05:00

24 lines
520 B
Bash
Executable File

#!/usr/bin/env bash
set -e
: ${WORKSPACE:=$(pwd)}
: ${IMAGE:=quay.io/airshipit/spyglass:latest}
: ${TERM_OPTS:=-t}
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='/var/spyglass'
docker run --rm $TERM_OPTS \
--net=host \
--workdir="$container_workspace_path" \
-v "${WORKSPACE}:$container_workspace_path" \
"${IMAGE}" \
spyglass "${@}"