-
Notifications
You must be signed in to change notification settings - Fork 129
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
Support running on MacOS #15
Comments
This will support filesystems like MacOs which don't have `cgroup`.
Thank you for this update :) I added check to see if |
Yes, the d4471d1 works. I think a "cleaner solution" would be to explicitly check for the operating system and don't call the import platform
# interestingly its docstring says:
# Returns the system/OS name, e.g. 'Linux', 'Windows' or 'Java'.
# but it returns 'Darwin' for MacOS
os = platform.system().lower()
if os == 'linux' and running_in_docker_container():
# ... But I am completely fine with the current solution too.
There are no native containers on MacOS and the Docker for Mac just uses a linux VM under the hood (see e.g. https://docs.docker.com/docker-for-mac/install/). Also, I don't think people run containers with e.g. procfs mounted in a different path or without cgroups. Though, we may see containers being based on cgroups v2 (which maybe produces different output of |
Closing this since it works, thanks :). |
Currently the tool does not work on MacOS as there is no cgroupfs there, as used in
KubiScan/api/api_client.py
Lines 22 to 28 in ad55e1c
This can be fixed by checking if the running OS is MacOS and if so, not executing the
is_running_in_container
function.The text was updated successfully, but these errors were encountered: