How to increase the pre-assigned memory of docker

2019-07-11 02:17发布

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

1条回答
虎瘦雄心在
2楼-- · 2019-07-11 03:06

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

查看更多
登录 后发表回答