exclude docker-bench-security container #286

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2018-11-23 10:50:34 +01:00
parent a7a24a8d7f
commit 9d9da6d375
2 changed files with 2 additions and 2 deletions

View file

@ -82,7 +82,7 @@ following steps:
```sh
git clone https://github.com/docker/docker-bench-security.git
cd docker-bench-security
docker build -t docker-bench-security .
docker build --no-cache -t docker-bench-security .
docker run -it --net host --pid host --cap-add audit_control \
-e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \
-v /var/lib:/var/lib \

View file

@ -95,7 +95,7 @@ beginjson "$version" "$(date +%s)"
main () {
# If there is a container with label docker_bench_security, memorize it:
benchcont="nil"
for c in $containers; do
for c in $(docker ps | sed '1d' | awk '{print $NF}'); do
if docker inspect --format '{{ .Config.Labels }}' "$c" | \
grep -e 'docker.bench.security' >/dev/null 2>&1; then
benchcont="$c"