By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Docker Bench Security (CIS Benchmark) scans and reports on Docker host security configuration. docker run -d --name docker-bench-security docker/docker-bench-security
docker images | grep docker-bench-security
docker-bench-security
docker ps -a | grep docker-bench-security
docker stop docker-bench-security
docker rm docker-bench-security
Purpose: Customize the Docker Bench Security scan.Command: docker run -d --name docker-bench-security -v /path/to/config:/etc/docker-bench-security docker/docker-bench-security Flags: -v mounts a volume to the container, /etc/docker-bench-security is the default configuration directory.
docker run -d --name docker-bench-security -v /path/to/config:/etc/docker-bench-security docker/docker-bench-security
-v
/etc/docker-bench-security
Purpose: Change the output format of the Docker Bench Security scan.Command: docker run -d --name docker-bench-security -e OUTPUT_FORMAT=JSON docker/docker-bench-security Flags: -e sets an environment variable, OUTPUT_FORMAT is the variable name, JSON is the value.
docker run -d --name docker-bench-security -e OUTPUT_FORMAT=JSON docker/docker-bench-security
-e
OUTPUT_FORMAT
JSON
Purpose: Change the log level of the Docker Bench Security scan.Command: docker run -d --name docker-bench-security -e LOG_LEVEL=DEBUG docker/docker-bench-security Flags: -e sets an environment variable, LOG_LEVEL is the variable name, DEBUG is the value.
docker run -d --name docker-bench-security -e LOG_LEVEL=DEBUG docker/docker-bench-security
LOG_LEVEL
DEBUG
Why it happens: The Docker Bench Security image is not installed.Fix: docker pull docker/docker-bench-security
docker pull docker/docker-bench-security
Why it happens: The container cannot be started due to a configuration issue.Fix: Check the container configuration and try again.
Why it happens: The configuration file is not accessible.Fix: Check the file permissions and try again.
Situation: You want to verify if Docker Bench Security is installed.Command: docker images | grep docker-bench-security Correct response: A list of images, including docker-bench-security.
Situation: You want to verify if the Docker Bench Security container is running.Command: docker ps -a | grep docker-bench-security Correct response: The container status (e.g., "Up 5 seconds").
Situation: You want to verify if the Docker Bench Security scan has completed.Command: docker logs docker-bench-security Correct response: A list of scan results.
docker logs docker-bench-security
• Docker Bench Security image name: docker/docker-bench-security • Default configuration directory: /etc/docker-bench-security • Default output format: TEXT • Default log level: INFO • ⚠️ Docker Bench Security container name: docker-bench-security • ⚠️ Docker Bench Security image tag: latest • ⚠️ Docker Bench Security configuration file: /etc/docker-bench-security/config.yml
docker/docker-bench-security
TEXT
INFO
latest
/etc/docker-bench-security/config.yml
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.