Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 519 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 519 Bytes

Demo 4

Introduction to cgroups

Start a container with memory limit and use tail to allocate memory

docker run -it --rm -m 32m --memory-swap 32m --name nginx nginx:1.20-alpine /bin/sh -c 'cat /dev/zero | head -c 8m | tail && echo Success'
docker run -it --rm -m 32m --memory-swap 32m --name nginx nginx:1.20-alpine /bin/sh -c 'cat /dev/zero | head -c 32m | tail && echo Success'

Navigation