mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
fix(bash): update bash script to fix exec from another dir prob
Signed-off-by: Maik Ellerbrock <opensource@frapsoft.com>
This commit is contained in:
parent
562e38da7c
commit
dcecae29e9
1 changed files with 8 additions and 8 deletions
|
@ -10,13 +10,13 @@
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Load dependencies
|
|
||||||
. ./output_lib.sh
|
|
||||||
. ./helper_lib.sh
|
|
||||||
|
|
||||||
# Setup the paths
|
# Setup the paths
|
||||||
this_path=$(abspath "$0") ## Path of this file including filenamel
|
this_path=$(dirname "${0}") ## Path of this file including filenamel
|
||||||
myname=$(basename "${this_path}") ## file name of this script.
|
myname=$(basename "${this_path}") ## file name of this script.
|
||||||
|
|
||||||
|
# Load dependencies
|
||||||
|
. ${this_path}/output_lib.sh
|
||||||
|
. ${this_path}/helper_lib.sh
|
||||||
|
|
||||||
export PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin/
|
export PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin/
|
||||||
|
|
||||||
|
@ -90,9 +90,9 @@ main () {
|
||||||
# List all running containers except docker-bench (use names to improve readability in logs)
|
# List all running containers except docker-bench (use names to improve readability in logs)
|
||||||
containers=$(docker ps | sed '1d' | awk '{print $NF}' | grep -v "$benchcont")
|
containers=$(docker ps | sed '1d' | awk '{print $NF}' | grep -v "$benchcont")
|
||||||
|
|
||||||
for test in tests/*.sh
|
for test in ${this_path}/tests/*.sh
|
||||||
do
|
do
|
||||||
. ./"$test"
|
. "${test}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue