docker ps as sudo
This commit is contained in:
parent
4858b7c646
commit
604c7a014c
|
@ -41,7 +41,10 @@ main() {
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
printf '\n\n$ docker ps\n\n'
|
printf '\n\n$ docker ps\n\n'
|
||||||
docker ps
|
# add on `/etc/sudoers.d/allow_dockerps` the following content:
|
||||||
|
# #https://serverfault.com/questions/184072/how-can-i-allow-all-users-to-run-a-given-command-via-sudo
|
||||||
|
# ALL ALL=NOPASSWD: /usr/bin/docker ps
|
||||||
|
sudo docker ps
|
||||||
}
|
}
|
||||||
|
|
||||||
main "${@}"
|
main "${@}"
|
||||||
|
|
Reference in New Issue