mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Check if the user has permissions for Docker
This commit is contained in:
parent
6c961dfad9
commit
67437f7b9c
@ -64,6 +64,17 @@ if [[ -z $(which docker-compose) ]] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
|
||||||
|
# If this fails, the user probably does not have permissions for Docker.
|
||||||
|
docker stats --no-stream 2>/dev/null 1>&2
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo ""
|
||||||
|
echo "WARN: It look like the current user does not have Docker permissions."
|
||||||
|
echo "WARN: Use 'sudo usermod -aG docker $USER' to assign Docker permissions to the user."
|
||||||
|
echo ""
|
||||||
|
sleep 3
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "############################################"
|
echo "############################################"
|
||||||
echo "### Paperless-ng docker installation ###"
|
echo "### Paperless-ng docker installation ###"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user