diff --git a/harden b/harden index 7514202..28cd969 100755 --- a/harden +++ b/harden @@ -250,6 +250,8 @@ function kernelSecurityModuleInit { } function dockerInit { + # Add user to docker group to avoid using sudo when running docker commands + sudo usermod -aG docker "$USER" # Get all arguments passed to the function and store them in the dockerImages array local dockerImages=("$@") # Check if the dockerImages array is empty and return 0 if it is