seme
seme

Reputation: 51

How to limit memory usage of docker

I tried to limit the maximum memory docker container can use like:

docker run -m --memory=512m

And I'm getting

invalid argument "--memory=512m" for "-m, --memory" flag: invalid size: '--memory=512m'

I couldn't find any examples in the documentation Docker Doc

Upvotes: 0

Views: 285

Answers (1)

Tsvetoslav Tsvetkov
Tsvetoslav Tsvetkov

Reputation: 1176

You must have a flag and value with a space between them. You must also specify the image name in your command

docker run -m 512m {{IMAGE}}

Upvotes: 2

Related Questions