#!/bin/sh
SIZE=1
[ $# -gt 0 ] && SIZE=$1
echo Allocate Memory Size: "$SIZE MB"
yes | tr \\n x | head -c $((1024*1024*$SIZE)) | grep n
FROM busybox
ADD test.sh /
#ENTRYPOINT ["sh", "-x", "/test.sh"]
ENTRYPOINT ["/test.sh"]
CMD []
docker service create --name testoom --restart-delay 10s --limit-cpu 1.0 --limit-memory 4m testoom 8
Content type
Image
Digest
Size
706.4 kB
Last updated
over 8 years ago
docker pull xinfengliu/testoom:0.1