docker.el
docker.el copied to clipboard
Running Docker with sudo
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.
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.