virtual machine - How do we set the the RAM and disk space for a docker container? -


following details of docker containers , images have.

animeshs-macbook-pro:docker_tests animesh$ docker-machine ls name          active   url          state     url                         swarm   docker    errors celery-test   *        virtualbox   running   tcp://192.168.99.100:2376           v1.9.1     hello-world   -        virtualbox   stopped                                       unknown     animeshs-macbook-pro:docker_tests animesh$ docker ps -a container id        image               command             created             status                      ports               names 33f0eca77b4c        celery-image1       "/bin/bash"         2 hours ago         exited (0) 25 minutes ago                       current_image a4607f34b309        ubuntu:latest       "/bin/bash"         4 hours ago         exited (0) 3 hours ago                          celery_app  animeshs-macbook-pro:docker_tests animesh$ docker-machine ssh celery-test boot2docker version 1.9.1, build master : cef800b - fri nov 20 19:33:59 utc 2015 docker version 1.9.1, build a34a1d5  docker@celery-test:~$ df -h filesystem                size      used available use% mounted on tmpfs                   896.6m    889.6m      7.0m  99% / tmpfs                   498.1m         0    498.1m   0% /dev/shm cgroup                  498.1m         0    498.1m   0% /sys/fs/cgroup none                    464.8g     44.0g    420.8g   9% /users tmpfs                   896.6m    889.6m      7.0m  99% /mnt/sda1/var/lib/docker/aufs  docker@celery-test:~$ exit  animeshs-macbook-pro:docker_tests animesh$ docker start current_image current_image  animeshs-macbook-pro:docker_tests animesh$ docker ps -a container id        image               command             created             status                   ports               names 33f0eca77b4c        celery-image1       "/bin/bash"         2 hours ago         3 seconds                                 current_image a4607f34b309        ubuntu:latest       "/bin/bash"         4 hours ago         exited (0) 3 hours ago                       celery_app  animeshs-macbook-pro:docker_tests animesh$ docker attach current_image root@33f0eca77b4c:/# df -h filesystem      size  used avail use% mounted on none            897m  890m  7.0m 100% / tmpfs           499m     0  499m   0% /dev tmpfs           499m     0  499m   0% /sys/fs/cgroup tmpfs           897m  890m  7.0m 100% /etc/hosts shm              64m     0   64m   0% /dev/shm  root@33f0eca77b4c:/# exit exit  animeshs-macbook-pro:docker_tests animesh$  

i appears have run out of space on vm.

i want assign 8gb disk space , 2gb ram celery-image1 image. how can that?

if there command line parameters can enter when create container, can also.

you can specify ram limit according documentation

the disk size it's not possible limited (but there work on that).


Comments