Skip to content

Instantly share code, notes, and snippets.

@christiangalsterer
Created February 28, 2018 16:40
Show Gist options
  • Save christiangalsterer/09037a0b23ffe11c58b027bc25a7320b to your computer and use it in GitHub Desktop.
Save christiangalsterer/09037a0b23ffe11c58b027bc25a7320b to your computer and use it in GitHub Desktop.

Bash into running container

docker exec -it <CONTAINER_ID> /bin/bash

Ash into running container

docker exec -it <CONTAINER_ID> /bin/ash

Limit Memory

docker run -it -rm -m 128m <IMAGE>

Limit CPU share

docker run -it -rm -c 512 <IMAGE>

Find OOM caused by cgroup limit violation

journalctl -f _TRANSPORT=kernel | grep OOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment