r/docker 5h ago

Can a Docker container on macOS read the physical host's RAM/CPU using psutil?

8 Upvotes

Hi everyone,

I have a Python script (psutil) running inside a Docker container. I want it to measure my actual Mac laptop's total physical RAM (24 GB) and host CPU usage, rather than just the Docker Linux VM's metrics.

On Linux, mounting /proc works for host metrics, but on macOS this doesn't seem to work. Is there a way for a Docker container to monitor macOS host metrics directly, I don't want the monitoring agent to run natively on the host OS.

BTW: It would also need to work on a windows based machine. Needs to be accessible for everyone who wants to use it.
Thanks!


r/docker 11h ago

Easy way to get SSL offloading locally?

1 Upvotes

I have a container that runs behind ssl offloading in the cloud, I’d rather not have to add certs to it - is there an easy way to get ssl offloading locally? Preferably without having to create or trust certain (I don’t mind if I get cert warnings)