Bobcares

Docker no space left on device Ubuntu – How we fix it?

by | Jan 18, 2020

Are you getting Docker error no space left on the device on your Ubuntu system?

We can help you to fix it. Usually, this error indicates insufficient space in the machine for the docker image to load.

At Bobcares, we often get requests to fix error on Docker, as a part of our Docker Hosting Support.

Today, let’s see how our Support Engineers fix this Docker error.

 

Why Docker shows the error no space left on the device Ubuntu?

Docker is a platform to build, share and run the application with containers. But, while setting up Docker, the user might come across errors.

Today, let’s discuss the error, ‘failed to register layer: no space left on the device’. The error message indicates that the Docker runs out of space.

Here the error shows up as the System hosting Docker does not have sufficient space. So, let’s see how we troubleshoot and fix this error in the Ubuntu server.

 

How we fix this Docker error no space left on the device?

Let’s see a few instances when our Support Engineers fixed this error.

 

Insufficient space in Ubuntu system

Recently one of our customers got the error no space left on device. So we checked the images in the server.

And this appears as,

Docker no space left on device.

These multiple images take up useful space in the server.

Hence to remove the image we use the command,

docker rmi <image_id> --force

But, if there are so many images to delete, we use the command,

Docker no space left on device Ubuntu.

In addition, by using the filter option we can remove the images created in a specified time.

 

Creating space by removing container logs

Similarly, the docker needs sufficient space in /var/lib/docker to write into it. So users get an error when the space is insufficient. Hence to create more space in the container, we remove large log files.

Our Support Engineers first list the log files. For this, we use the command,

du -d1 -h /var/lib/docker/containers | sort -h

The output of this command lists the container directories and log size. Hence, to clear the container log we use the command,

cat /dev/null > /var/lib/docker/containers/container_id/container_log_name

But, if there is no root access then we use the below command to prevent permission errors.

sudo sh -c "cat /dev/null > /var/lib/docker/containers/container_id/container_log_name"

Hence this resolves the error.

 

[Need assistance in fixing Docker errors? – Our Experts are available 24/7.]

 

Conclusion

In short, the Docker shows no space left on the device in a Ubuntu system when it runs out of space. We saw different situations where a system can run out of space. Today, we saw how our Support Engineers fix this error.

Are you using Docker based apps?

There are proven ways to get even more out of your Docker containers! Let us help you.

Spend your time in growing business and we will take care of Docker Infrastructure for you.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF