Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save martin-juul/cf98ffc7a45d9009958a1829176e2987 to your computer and use it in GitHub Desktop.
Save martin-juul/cf98ffc7a45d9009958a1829176e2987 to your computer and use it in GitHub Desktop.

docker update --memory "1g" --cpuset-cpu "1" <RunningContainerNameOrID> this will update the "RunningContainerNameOrId" to use 1g of memory and only use cpu core 1

To up date all running containers to use core 1 and 1g of memory:

docker update --cpuset-cpus "1" --memory "1g" $(docker ps | awk 'NR>1 {print $1}')

https://stackoverflow.com/a/39152553

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment