-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
Updated Docker Installation Alias for linux #1492
Updated Docker Installation Alias for linux #1492
Conversation
Signed-off-by: Akash <akashsingh2210670@gmail.com>
@slayerjain Kindly look into this PR for the issue you opened |
@Akash-Singh04 thanks for the PR. @PranshuSrivastava since you were working on this script, can you please and test this? |
Hey @Akash-Singh04, thanks for the PR. But this is not a good solution for the problem. This is kind of a hack to check if docker runs with sudo or not. So in macos sudo is generally not required, but in linux sudo is required but it can be removed with a specific configuration. So take a look at how the need for sudo is removed in Linux, and check if the user's system has that configuration or not, and if it does then don't use sudo |
Signed-off-by: Akash <akashsingh2210670@gmail.com>
In this updated implementation, we check if the current user belongs to the Reference: https://askubuntu.com/a/477554 @PranshuSrivastava Kindly check this implementation and let me know if it is an optimal solution. If you have any other resources that are viable to this issue, kindly share. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of the changes look good, there is just one comment that you need to address.
keploy.sh
Outdated
docker volume create --driver local --opt type=debugfs --opt device=debugfs debugfs | ||
fi | ||
alias keploy='docker run --pull always --name keploy-v2 -p 16789:16789 --privileged --pid=host -it -v $(pwd):$(pwd) -w $(pwd) -v /sys/fs/cgroup:/sys/fs/cgroup -v debugfs:/sys/kernel/debug:rw -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock -v '"$HOME"'/.keploy-config:/root/.keploy-config -v '"$HOME"'/.keploy:/root/.keploy --rm ghcr.io/keploy/keploy' | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use else if here, we are doing this specifically on linux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly check if this was the intended change
Signed-off-by: Akash <akashsingh2210670@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related Issue
Closes: #1469
Describe the changes you've made
docker ps
runs successfully without sudo.Type of change
Please let us know if any test cases are added
NIL
Describe if there is any unusual behaviour of your code(Write
NA
if there isn't)NIL
Checklist: