mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
Print more details in help message
This commit is contained in:
parent
c623d3afdd
commit
59a63dd49a
1 changed files with 18 additions and 1 deletions
|
@ -46,8 +46,21 @@ fi
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
usage: ${myname} [options]
|
Docker Bench for Security - Docker, Inc. (c) 2015-$(date +"%Y")
|
||||||
|
Checks for dozens of common best-practices around deploying Docker containers in production.
|
||||||
|
Inspired by the CIS Docker Benchmark v1.2.0.
|
||||||
|
|
||||||
|
Usage: ${myname} [OPTIONS]
|
||||||
|
|
||||||
|
Example:
|
||||||
|
- Only run check "2.2 - Ensure the logging level is set to 'info'":
|
||||||
|
sh docker-bench-security.sh -c check_2_2
|
||||||
|
- Run all available checks except the host_configuration group and "2.8 - Enable user namespace support":
|
||||||
|
sh docker-bench-security.sh -e host_configuration,check_2_8
|
||||||
|
- Run just the container_images checks except "4.5 - Ensure Content trust for Docker is Enabled":
|
||||||
|
sh docker-bench-security.sh -c container_images -e check_4_5
|
||||||
|
|
||||||
|
Options:
|
||||||
-b optional Do not print colors
|
-b optional Do not print colors
|
||||||
-h optional Print this help message
|
-h optional Print this help message
|
||||||
-l FILE optional Log output in FILE, inside container if run using docker
|
-l FILE optional Log output in FILE, inside container if run using docker
|
||||||
|
@ -56,6 +69,10 @@ usage () {
|
||||||
-i INCLUDE optional Comma delimited list of patterns within a container or image name to check
|
-i INCLUDE optional Comma delimited list of patterns within a container or image name to check
|
||||||
-x EXCLUDE optional Comma delimited list of patterns within a container or image name to exclude from check
|
-x EXCLUDE optional Comma delimited list of patterns within a container or image name to exclude from check
|
||||||
-n LIMIT optional In JSON output, when reporting lists of items (containers, images, etc.), limit the number of reported items to LIMIT. Default 0 (no limit).
|
-n LIMIT optional In JSON output, when reporting lists of items (containers, images, etc.), limit the number of reported items to LIMIT. Default 0 (no limit).
|
||||||
|
|
||||||
|
Complete list of checks: <https://github.com/docker/docker-bench-security/blob/master/functions_lib.sh>
|
||||||
|
Full documentation: <https://github.com/docker/docker-bench-security>
|
||||||
|
Released under the Apache-2.0 License.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue