mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
sh if lint
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
c36649362b
commit
7fc5dc33a7
1 changed files with 2 additions and 6 deletions
|
@ -240,9 +240,7 @@ else
|
|||
|
||||
fail=0
|
||||
for c in $containers; do
|
||||
docker inspect --format '{{ .Config.Memory }}' "$c" 2> /dev/null 1>&2
|
||||
|
||||
if [ "$?" -eq 0 ]; then
|
||||
if docker inspect --format '{{ .Config.Memory }}' "$c" 2> /dev/null 1>&2; then
|
||||
memory=$(docker inspect --format '{{ .Config.Memory }}' "$c")
|
||||
else
|
||||
memory=$(docker inspect --format '{{ .HostConfig.Memory }}' "$c")
|
||||
|
@ -269,9 +267,7 @@ else
|
|||
|
||||
fail=0
|
||||
for c in $containers; do
|
||||
docker inspect --format '{{ .Config.CpuShares }}' "$c" 2> /dev/null 1>&2
|
||||
|
||||
if [ "$?" -eq 0 ]; then
|
||||
if docker inspect --format '{{ .Config.CpuShares }}' "$c" 2> /dev/null 1>&2; then
|
||||
shares=$(docker inspect --format '{{ .Config.CpuShares }}' "$c")
|
||||
else
|
||||
shares=$(docker inspect --format '{{ .HostConfig.CpuShares }}' "$c")
|
||||
|
|
Loading…
Reference in a new issue