Skip to content

Instantly share code, notes, and snippets.

@mariusvniekerk
Created June 13, 2018 20:27
Show Gist options
  • Save mariusvniekerk/f468f3035fe55bae7189f5d7ecefe4f2 to your computer and use it in GitHub Desktop.
Save mariusvniekerk/f468f3035fe55bae7189f5d7ecefe4f2 to your computer and use it in GitHub Desktop.
Run a container and have psutil work properly
docker run --memory 128mb \
-v /var/lib/lxcfs/proc/meminfo:/proc/meminfo:rprivate \
--cpus 1 \
-v /var/lib/lxcfs/proc/cpuinfo:/proc/cpuinfo:rprivate \
-it \
ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment