Docker Memory Constraints
Don’t use free
to measure container memory usage
#
Inside the container, tools like free
report the host’s available swap, not what’s available inside the container.
Don’t rely on the output of free
or similar tools to determine whether swap is present.1
Instead use docker stats <CONTAINER ID>
2.
More info: docker --memory-swap docs ↩︎
See: docker stats docs ↩︎