Docker Memory limit should, If you’re facing this issue when you’re trying to increase the Docker Container Memory allocation size, So this error will come when u didn’t specify the memory size of a container when u created it. You can find docker memory requirements and also check docker stats memory usage and CPU. so
Error: Memory limit should be smaller than already set memory swap limit, update the memory swap at the same time.
Docker Memory limit should be smaller:
you can define memory size when you’re going to create the docker container using the command line interface.
Check Out: Rename Docker Container
docker update -m 400m phpmem
Now you have to do this to increase the container memory. You just have to disable the Memory Swap Limit on the container.
Disable Memory Swap Limit
–memory-swap = -1
docker update -m 200m –memory-swap -1 phpmem
You may check now.
Check Out: Container logs
YouTube Link: Memory Limit Issue in Container
You’re done docker memory requirements docker cpu usage docker stats memory usage docker container memory allocation