Hello Pare, For today's tips and trick tutorial I'm going to show you how to fix "No Error Space Left On Device" when using docker.
Sometimes you are wondering why we encounter this kind of error. You don't even touch anything in the server and then BOOM!!! 💣 💣 💣, when starting your docker container this will happen.
Take note the last part "No Space Left On Device". It only means that your server doesn't have enough space to store some files that were generating by your docker build.
To verify if you have still had enough space in your server you may try to run this command which displays your server available space.
Based on the output above, if you check the
/dev/vda1, My server usage is almost 50%, which I only have 13G available storage. If somehow in your server Use% shown 99% or 100% then most probably the culprit of that is your docker unused containers, images and log files.
How can we verify if our docker uses more storage in our server?
Using our disk usage command in linux. Type this command
The output should be like this, which you may see the highest folder will be at the top of the lists. In my server, it was the /overlay2 folder.
Make sure to stop all running docker container before Run this command in your server.
This command will remove all unused images and all dangling images.
Double check again your storage space using
df -h command, and check if you have enough space already.
After running the command you will reclaimed new storage space again. You may now start your
docker-compose up -d --build.
I hope we solve already your problem with regards to no space left on the device while using docker in your server. Let me know if you encounter a different problem and we will try to solve it together.
Thanks pare. 👊 👊 👊
Do you want to learn how to make web apps using React? ✋ ✋ ✋ ✋
Just browse our latest tutorial in our react category section. Explore our list of tutorial for react js
I hope you enjoy our tutorial, Let me know incase you encounter any error I would love to answer that. Don't forget to subscribe to my Youtube Channel at Let's Code Pare - Youtube Channel