Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker increase disk space

Tags:

I have a docker running and it gives me disk space warning. How can i increase the docker space and start again? (The same container)

Lets say I want to give like 15gb.

like image 251
TechnoCorner Avatar asked Sep 09 '15 17:09

TechnoCorner


People also ask

Can I add volume to existing Docker container?

Adding a Volume To a Running Docker Container Containers must have their volumes configured on startup, which means to add a new volume, you must restart the container. While there is a hacky solution (more on that below), it's highly recommended that a container restart should be done anyway.

How much disk space does a Docker container have?

In the current Docker version, there is a default limitation on the Docker container storage of 10Gb.


1 Answers

I assume you are talking about disk space to run your containers.

Make sure that you have enough space on whatever disk drive you are using for /var/lib/docker which is the default used by Docker. You can change it with the -g daemon option.

If you don't have enough space you may have to repartition your OS drives so that you have over 15GB. If you are using boot2docker or docker-machine you will have to grow the volume on your Virtual Machine. It will vary depending on what you are using for Virtualization (i.e VirtualBox, VMware, etc)

For example if you are using VirtualBox and docker-machine you can start with something like this for a 40GB VM.

docker-machine create --driver virtualbox --virtualbox-disk-size "40000" default
like image 163
Rico Avatar answered Sep 30 '22 16:09

Rico