Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the pre-assigned memory of docker container?

I have assigned 2GB of RAM memory as maximum memory limit for the docker container while creating the same. Now that more memory is required, is there way to increase the maximum RAM limit for the existing container?

I used the following command to create the container.

docker run --name=mysql_50000 -m 2g -p 50000:3306 mysql_docker_image_v4

It worked fine as expected. My container has a maximum memory limit of 2GB. I need it to be 3GB now. Any help is appreciated. Thanks

like image 915
daedalus_hamlet Avatar asked Feb 07 '19 06:02

daedalus_hamlet


1 Answers

Please use docker update command with appropriate parameters (-m 3G). See doc: https://docs.docker.com/engine/reference/commandline/update/

like image 154
Jan Garaj Avatar answered Oct 21 '22 08:10

Jan Garaj