Better Programming

Advice for programmers.

Follow publication

Member-only story

Docker Tips: Clean Up Your Local Machine

Understand disk space usage and reclaiming the unused part

Luc Juggery
Better Programming
Published in
9 min readDec 16, 2019

--

Source: Xmodulo on Flickr

In this piece, we’ll go back to basics. We will look at how Docker uses the disk space of the host machine and how to reclaim it when it is not being used anymore.

Overall Consumption

Docker is great, there’s no doubt about that. A couple of years ago, it provided a new way to build, ship and run any workloads by democratizing the usage of containers and hugely simplifying management of their lifecycle.

It also brought the developer the ability to run any applications without polluting the local machine. But, when we run containers, pull images, deploy complex application stacks, and build our own images the footprint on our host filesystem might increase in a significant way.

If we have not cleaned up our local machine for a while we might be surprised by the result of this command:

$ docker system df

--

--

Luc Juggery
Luc Juggery

Written by Luc Juggery

Docker & Kubernetes trainer (CKA / CKAD), 中文学生, Learning&Sharing

Responses (3)

Write a response