pegleg/tools/pegleg.sh
Ahmad Mahmoudi eb0deeb9e5 Pegleg encryption of site secrets
Added secret encryption/decryption to pegleg cli.

Change-Id: I95b993748d99fc4398eee1d1c59e74f382497f74
2018-10-30 16:53:51 +00:00

27 lines
655 B
Bash
Executable File

#!/usr/bin/env bash
set -e
: ${WORKSPACE:=$(pwd)}
: ${IMAGE:=quay.io/airshipit/pegleg:latest}
: ${TERM_OPTS:=-it}
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 $TERM_OPTS \
--net=host \
--workdir="$container_workspace_path" \
-v "${HOME}/.ssh:${container_workspace_path}/.ssh" \
-v "${WORKSPACE}:$container_workspace_path" \
-e "PEGLEG_PASSPHRASE=$PEGLEG_PASSPHRASE" \
-e "PEGLEG_SALT=$PEGLEG_SALT" \
"${IMAGE}" \
pegleg "${@}"