Thursday, 2 November 2017

Doh, Apple Time Machine and Docker - Disk and Om Nom Nom

I was trying to work out why my Time Machine backup from my primary Mac was taking oh-so-long, even via a 100 Mb/s Ethernet connection.

I wondered whether Docker was part of the "problem" ….

Guess what ….

It was - when I checked where Docker keeps its images: -

ls -alh /Users/davidhay/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux

total 20068896
drwxr-xr-x  21 davidhay  staff   672B  2 Nov 08:16 .
drwxr-xr-x  27 davidhay  staff   864B  2 Nov 08:16 ..
-rw-r--r--   1 davidhay  staff   9.6G  2 Nov 12:30 Docker.qcow2
-rw-r--r--   1 davidhay  staff    64K  2 Nov 09:49 console-ring
-rw-r--r--   1 davidhay  staff    64K  2 Nov 08:12 console-ring.0
-rw-r--r--   1 davidhay  staff    64K  1 Nov 20:27 console-ring.1
-rw-r--r--   1 davidhay  staff    64K 29 Sep 19:44 console-ring.10
-rw-r--r--   1 davidhay  staff    64K 27 Oct 08:54 console-ring.2
-rw-r--r--   1 davidhay  staff    64K 18 Oct 14:10 console-ring.3
-rw-r--r--   1 davidhay  staff    64K  9 Oct 21:51 console-ring.4
-rw-r--r--   1 davidhay  staff    64K  6 Oct 16:01 console-ring.5
-rw-r--r--   1 davidhay  staff    64K  4 Oct 00:46 console-ring.6
-rw-r--r--   1 davidhay  staff    64K  3 Oct 18:05 console-ring.7
-rw-r--r--   1 davidhay  staff     4B  2 Nov 08:16 hypervisor.pid
-rw-r--r--   1 davidhay  staff     0B 30 Aug  2016 lock
drwxr-xr-x  83 davidhay  staff   2.6K  8 Jan  2017 log
-rw-r--r--   1 davidhay  staff    17B  2 Nov 08:16 mac.0
-rw-r--r--   1 davidhay  staff    36B 30 Aug  2016 nic1.uuid
-rw-r--r--   1 davidhay  staff     4B  2 Nov 08:16 pid
-rw-r--r--   1 davidhay  staff   206K  2 Nov 08:16 syslog
lrwxr-xr-x   1 davidhay  staff    12B  2 Nov 08:16 tty -> /dev/ttys000


Now given that I've only got three images: -

docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
websphere-liberty   wlp101              987d283ae2ed        3 weeks ago         418MB
websphere-liberty   latest              9fc80e109362        3 weeks ago         455MB
websphere-liberty   webProfile7         905fc63e8e9b        6 weeks ago         411MB


9.6 GB seems a little bit rich but ….

As you can imagine, I don't really need to back up those images to Time Machine, so I've now added that folder to the TM exclusion list: -


Thanks to this: -

Where are images stored on Mac OS X?

and, by the way, the Docker Preferences pane: -


The QCOW2 file is resizable according to this: -


but I don't think I'll bother ….

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...