mirror of
https://github.com/docker/docker-bench-security.git
synced 2024-11-01 08:31:44 +01:00
Merge pull request #349 from konstruktoid/ISSUE286
exclude docker-bench-security container #286
This commit is contained in:
commit
cc6b16d8a7
2 changed files with 2 additions and 2 deletions
|
@ -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 \
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue