Search code examples
dockerubuntu-16.04

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


Solution

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