"sudo" pide la contraseña del usuario (más o menos) cada vez que se usa:
[user@host123 ~]sudo docker ps [ sudo] password for user:
Solución:
Cuidado porque suprimir la contraseña puede ser un problema grave de seguridad.
Editar el fichero de configuración de sudo (ejecutar "visudo") y añadir una línea por cada comando que queramos permitir.
Por ejemplo, para permitir que un usuario ("user") ejecute docker tendríamos que añadir la siguiente línea:
user host123 = (root) NOPASSWD: /usr/bin/docker
O si queremos que el grupo "group" pueda ejecutar docker:
%group host123 = (root) NOPASSWD: /usr/bin/docker
(host123 es el hostname de la máquina)
Para rizar el rizo podemos definir un alias:
alias docker='sudo docker'
De este modo:
[user@host123 ~]docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1 Del gralion torile -
excellent points altogether, you just gained a new reader. What would you suggest about your post that you made some days ago? Any positive?
2 Del Jerry -
Great web site you've got here.. It's difficult to find high-quality writing like
yours these days. I honestly appreciate individuals like you!
Take care!!
3 Del Wally -
I think the admin of this web page is really working hard for his website, for the reason that here every information is quality based information.
4 Del coretananuar.com -
Hello! I know this is kinda off topic but I was wondering which blog platform are you using for this website?
I'm getting tired of Wordpress because I've had problems with
hackers and I'm looking at options for another platform.
I would be great if you could point me in the direction of a good platform.
5 Del Vida -
Hello there, I do believe your site may be having
browser compatibility issues. Whenever I take a look at your blog in Safari, it looks fine however when opening in I.E., it's got
some overlapping issues. I just wanted to give you
a quick heads up! Aside from that, fantastic blog!
6 Del wiki-neon.win -
Hi there, I would like to subscribe for this webpage to get latest
updates, so where can i do it please help out.
7 Del Deanna -
Appreciation to my father who told me concerning this web site,
this blog is truly awesome.