Romuloux
Romuloux

Reputation: 1183

Dokku/Docker out of disk space - How to enter app

So my question is I have an errant rails app deployed using Dokku with the default Digital Ocean setup. This rails app has eaten all of the disk space as I did not set up anything to clean out the /tmp directory.

So the output of df is:

Filesystem 1K-blocks Used Available Use% Mounted on udev 1506176 0 1506176 0% /dev tmpfs 307356 27488 279868 9% /run /dev/vda1 60795672 60779288 0 100% / tmpfs 1536772 0 1536772 0% /dev/shm tmpfs 5120 0 5120 0% /run/lock tmpfs 1536772 0 1536772 0% /sys/fs/cgroup /dev/vda15 106858 3419 103439 4% /boot/efi tmpfs 307352 0 307352 0% /run/user/0

So I am out of disk space, but I don't know how to enter the container to clean it. Any dokku **** return /home/dokku/.basher/bash: main: command not found Access denied which I have found out is because I am completely out of HD space.

So 2 questions.

1: How do I get into the container to clear the tmp directory

2: Is there a way to set a max disk size limit so Dokku doesn't eat the entire HD again?

Thanks

Upvotes: 6

Views: 3339

Answers (1)

pigroxalot
pigroxalot

Reputation: 140

Dokku uses docker to deploy your application, you are probably accumulating a bunch of stale docker images, which over time can take over all of your disk space.

Try running this:

docker image ls

Then try removing unused images:

docker system prune -a

For more details, see: https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes

Upvotes: 6

Related Questions