docker search with sudo

This commit is contained in:
lunardunno 2024-07-20 00:39:42 +04:00 committed by GitHub
parent ef902e6ddb
commit 3fc1a51a4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,7 +14,7 @@ if ! command -v sudo > /dev/null 2>&1; then $pm $check_pkgs; $pm $silent_inst su
if ! command -v fuser > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst psmisc || fuser 2>&1 > /dev/null || exit 1; fi;\
if ! command -v lsof > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst lsof || lsof 2>&1 > /dev/null || exit 1; fi;\
if ! command -v docker > /dev/null 2>&1; then sudo $pm $check_pkgs;\
if [ -n "$($pm $wh_pkg $docker_pkg 2>/dev/null | grep moby-engine)" ]; then echo "Docker is not supported"; echo "command not found"; exit 1;\
if [ -n "$(sudo $pm $wh_pkg $docker_pkg 2>/dev/null | grep moby-engine)" ]; then echo "Docker is not supported"; echo "command not found"; exit 1;\
else sudo $pm $silent_inst $docker_pkg || docker 2>&1 > /dev/null || exit 1;\
fi;\
if [ -n "$(sudo docker --version 2>/dev/null | grep podman)" ]; then check_srv="podman.socket podman"; sudo touch /etc/containers/nodocker; fi;\