Increase Size of Gitlab Docker Container

Good Afternoon - I have a gitlab docker install that was originally setup using all of the default settings. As a result we currently are limited to the base container size of 10GB which will soon become insufficient. I am just curious if anyone else has run into that issue and what they did to resolve it.

It appears you can rebuild your docker environment and change the default size of new containers when created but I am new to docker and that sounds a bit risky. Is it possible, to anyone’s knowledge, to create an additional volume and attach it to the gitlab container to extend the current capacity?

Your thoughts/input is greatly appreciated!

Maybe:

--storage-opt dm.basesize=20G as dockerd options and recreate your containers.

The preferred way of dealing with persisted data with Docker applications is to mount volumes. Your container (or rather, the image from which it is instantiated) should only be as big as is necessary to store its binaries. Most I’ve come across are less than 1 GB, some below 500 MB.

Check out this page:
https://docs.gitlab.com/omnibus/docker/

They show you how to run the Docker commands to mount volumes. Note that they are mounting a volume specifically for the “data”. That’s the key here. You could have your data grow tons in the future. Using a Docker volume for it means that it is only limited by the space available on the disk you have the volume stored on, and most of the time, disks can be expanded and migrated to bigger capacity physical drives. So this makes it quite future-proof.

If the idea of volumes still feels a bit fuzzy to you, I’d suggest looking at the Docker docs on volumes too:
https://docs.docker.com/engine/admin/volumes/volumes/