I am trying to deploy several Java (spring boot) apps in docker containers in 1 host, where I set memory limits (--memory=30m --memory-swap=50m)
for each.
However when I check the limits using docker container stats, I see each container is using >400MB
of the host's RAM. Due to this I cannot start all the containers I need as the kernel kills some of them (OOM
).
What do I need to do to ensure that the containers' memory is controlled using the docker memory options?
My host is a digital ocean centos 7. Thanks