How To Update Memory Size of Running Container In Docker

How to update memory, If you already created a container without specifying the Memory Size to a container & now not able to increase the Memory of container. you can increase running docker container memory usage and allocation. You can also increase the memory swap of the docker.so

Check Out: Manually Assign Memory

How To Update Memory Size of Running Container In Docker:

you can define memory at the time of creating the container using the command line on the Linux server. you can also do this later but you will have to stop the container to increase.so

Increase Memory Size

I’m supposing you have already created a container if you don’t know how to do that, follow this link Create Container

PHP Container:

docker run -itd –name phpmem a1c0790840ba /bin/bash

Check Out: How To Launch EC2 Instances(server) On Amazon Cloud

How To Update Memory

By Default, Memory assign by docker.

docker stats phpmem –no-stream

increase memory running container

Check Out: How To Clear Cache Memory, Buffer Cache In Linux

I have updated the PHP container memory to 400M

docker update -m 400m phpmem

You may check here.

docker stats phpmem –no-stream

YouTube Link: Memory Size

You’re done increase memory running container docker container memory usage allocation memory swap

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment