Saturday, November 9, 2019

Docker container unhealthy

The other day I was just starting all my docker instances by running docker-compose up -d like I often do, but it started failing telling me that some of the containers were unhealthy.

results-db is up-to-date
Starting db cnlts_main-db_1 ...

Starting db cnlts_main-db_1 ... done

ERROR: for cnlts-db-flyway Container "0ab31508826c" is unhealthy.
ERROR: Encountered errors while bringing up the project.

After running docker logs "0ab31508826c" to see what was going on in the container, I noticed this:

initdb: could not create directory "/var/lib/postgresql/data/pg_xlog": No space left on device

So went to the docker preferences page using the docker GUI to try to find the memory allocation in the disk settings


So there I say that the Disk image size was close to the max. One option was to increase it but I didn't want to do that because it would take unnecessarily more resources from my laptop. I think 64GB is more than enough. So what I just had to do was to delete that file called Docker.raw

The path to that file was written in the gui. I just had to go to that directory and delete it.
rm /Users/<username>/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw 

No comments:

Post a Comment

Share with your friends