pegleg/tools/pegleg.sh
Kaspars Skels 4245926e68 Fixes for pegleg.sh
Update image reference to quay.io/airshipit vs quay.io/attcomdev.

Set host networking for running pegleg container.
Recent Ubuntu releases are using 127.0.0.53 in /etc/resolv.conf,
and host networking mode is a way to work around local DNS.

Change-Id: Ib3e39e6f83e0bb7a50f92f85b791c8d0b59664d1
2018-08-23 16:36:42 -05:00

22 lines
485 B
Bash
Executable File

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