docker.el icon indicating copy to clipboard operation
docker.el copied to clipboard

Running Docker with sudo

Open JeremyWeed opened this issue 8 years ago • 1 comments

On my machine, I need run docker with root privileges. When I tried changing the docker-command to sudo docker, I just got no tty present and no askpass. Luckily, I was able to get it working using Advise:

(defadvice docker (around my-docker-sudo-fix (action &rest args))
	(let ((default-directory "/sudo::"))
	  ad-do-it action args))

I haven't extensively tested this, and I didn't know if you'd want to add this to the package, or just put a note about it in the README, so I'm just submitting it as an issue.

JeremyWeed avatar Feb 16 '18 15:02 JeremyWeed

Interesting. I'm not sure what the correct fix for this issue is tho... I'll need to think about it.

If you have a proposal that is logical in the emacs world, don't hesitate to propose one... but yeah in the worse case we'll make a note in the README.

Silex avatar Feb 16 '18 17:02 Silex