Skip to content

Instantly share code, notes, and snippets.

@hapylestat
Created April 20, 2021 22:22
Show Gist options
  • Select an option

  • Save hapylestat/61b2bd4d02eb2ba669379ca5f96c20fa to your computer and use it in GitHub Desktop.

Select an option

Save hapylestat/61b2bd4d02eb2ba669379ca5f96c20fa to your computer and use it in GitHub Desktop.
Example how to make container see proper limits
#!/bin/bash
#require lxcfs
podman run --rm -it --memory=100M \
-v /var/lib/lxcfs/proc/cpuinfo:/proc/cpuinfo:rw \
-v /var/lib/lxcfs/proc/diskstats:/proc/diskstats:rw \
-v /var/lib/lxcfs/proc/meminfo:/proc/meminfo:rw \
-v /var/lib/lxcfs/proc/stat:/proc/stat:rw \
-v /var/lib/lxcfs/proc/swaps:/proc/swaps:rw \
-v /var/lib/lxcfs/proc/uptime:/proc/uptime:rw \
centos:7 bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment