Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker needs sudo on Unices #5

Open
hongooi73 opened this issue Dec 2, 2019 · 3 comments
Open

Docker needs sudo on Unices #5

hongooi73 opened this issue Dec 2, 2019 · 3 comments

Comments

@hongooi73
Copy link

Hi, I found your package from the rockerverse paper. Nice work!

One thing though: running docker typically requires sudo on Unix-based OSes, including Linux and Mac. I'll make a PR for this.

> list_images()
WARNING: Error loading config file: /home/hongo/.docker/config.json: stat /home/hongo/.docker/config.json: permission denied
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/images/json: dial unix /var/run/docker.sock: connect: permission denied
Error in gregexpr(pattern = "\\s\\s\\w", header)[[1]] :
  subscript out of bounds
In addition: Warning message:
running command 'docker image ls ' had status 1
@hongooi73
Copy link
Author

It would probably also be better to use the processx package rather than system and system2. This provides a robust way to capture the result of the system call, and is platform-independent.

@thebioengineer
Copy link
Owner

Thanks for the feedback, I'll take a look at processx. I've never seen that before.

I obviously tested this on my windows machine, so I didnt need sudo. And in my past experience I did not need sudo when I was working on an opensuse server. However, that's not to say that is everyone's situation. Maybe a way for people to pass sudo passwords when necessary...

@hongooi73
Copy link
Author

processx is used by devtools, so it's highly likely you've already got it installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants