kolla/tools/validate-docker-execute.sh
Steven Dake 77a67deeb6 Rename validate-docker-execute with .sh extension
TrivialFix

Change-Id: I3ad67fd802f7fe3ed7deb88eddebe520ff410a4f
2016-03-08 22:14:09 -07:00

15 lines
384 B
Bash
Executable File

#!/bin/bash
#
# This script can be used to check user privilege to execute
# docker commands
function check_dockerexecute {
docker ps &>/dev/null
return_val=$?
if [ $return_val -ne 0 ]; then
echo "User $USER can't seem to run Docker commands. Verify product documentation to allow user to execute docker commands" 1>&2
exit 1
fi
}
check_dockerexecute