How do I set resources allocated to a container using docker? -


as title of question suggests i'm wanting set max disk/memory , cpu usage container using docker (docker.io).

is there way using docker?

memory/cpu

docker supports more resource allocation options:

  • cpu shares, via -c flag
  • memory limit, via -m flag
  • specific cpu cores, via --cpuset flag

have @ docker run --help more details.

if use lxc backend (docker -d --exec-driver=lxc), more fine grained resource allocation schemes can specified, e.g.:

docker run --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"\            --lxc-conf="lxc.cgroup.cpu.shares = 1234" 

storage

limiting storage bit trickier @ moment. please refer following links more details:


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -