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

Error when running on fresh install with a sudo-protected docker executable: #2246

Closed
nicain opened this issue Jan 11, 2023 · 2 comments
Closed
Labels
O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity question Further information is requested

Comments

@nicain
Copy link

nicain commented Jan 11, 2023

What I tried: npx mega-linter-runner

What I got:

Pulling docker image oxsecurity/megalinter:v6 ... 
INFO: this operation can be long during the first use of mega-linter-runner
The next runs, it will be immediate (thanks to docker cache !)
WARNING: Error loading config file: /root/.docker/config.json: open /root/.docker/config.json: permission denied
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=oxsecurity%2Fmegalinter&tag=v6": dial unix /var/run/docker.sock: connect: permission denied

How I fixed it: https://stackoverflow.com/a/54504083
sudo setfacl --modify user:<user name or ID>:rw /var/run/docker.sock

@nicain nicain added the question Further information is requested label Jan 11, 2023
@Kurt-von-Laven
Copy link
Collaborator

I suspect this is a duplicate of #1975. Currently MegaLinter doesn't change the Docker user from its default of root. What is a sudo-protected Docker executable? I am only familiar with rootless docker, which we have been using successfully with MegaLinter. You can probably improve performance considerably by using a specific flavor.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Feb 11, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants