Docker doesn't release disk space used by `~/Library/Containers/com.docker.docker/` #23437

Closed
kommen opened this Issue Jun 10, 2016 · 14 comments

Projects

None yet

8 participants

@kommen
kommen commented Jun 10, 2016 edited

Output of docker version:

$ docker version
Client:
 Version:      1.11.1
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   5604cbe
 Built:        Wed Apr 27 00:34:20 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.11.1
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   8b63c77
 Built:        Fri Jun  3 08:34:52 2016
 OS/Arch:      linux/amd64

Trying to update says:

Docker 1.11.1-beta14 is currently the newest version available.

Output of docker info:

docker info
Containers: 4
 Running: 0
 Paused: 0
 Stopped: 4
Images: 0
Server Version: 1.11.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 27
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 4.4.11-moby
Operating System: Alpine Linux v3.3
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.955 GiB
Name: moby
ID: TER2:AI3F:QLVM:OMSA:QBZD:3YEG:HRQN:RTJY:7CBO:Q5IY:4OSG:HJMP
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): true
 File Descriptors: 25
 Goroutines: 43
 System Time: 2016-06-10T15:54:47.675117153Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Username: nextjournal
Registry: https://index.docker.io/v1/

Additional environment details (AWS, VirtualBox, physical, etc.): OS X 10.11.5 (15F34)

Steps to reproduce the issue:
Delete all images, docker images -a reports no images installed

Describe the results you received:
Docker still uses all the space it once occupied, even after deleting all images:

$ du -h -d 1  ~/Library/Containers/com.docker.docker  
 25G    /Users/kommen/Library/Containers/com.docker.docker/Data
 25G    /Users/kommen/Library/Containers/com.docker.docker

Describe the results you expected:
Used space released after removing images with docker images -q | xargs docker rmi --force

Additional information you deem important (e.g. issue happens only occasionally):

@thaJeztah
Member

I think this is a known issue with Docker for Mac (although I see it's not listed in https://beta.docker.com/docs/mac/troubleshoot/#known-issues @justincormack). The space is probably occupied by the Docker.qcow2 file, which is the filesystem for the "vm" that Docker for Mac runs in.

Given that this is a Docker for Mac issue, please report/discuss this on https://forums.docker.com/c/docker-for-mac, so that other users running the beta can also benefit from it. I'll close this issue here, but feel free to continue the discussion 👍

@thaJeztah thaJeztah closed this Jun 10, 2016
@thaJeztah
Member

Note that you can exclude this file from your Time Machine backups (inside preferences), also, doing a "factory reset" (reset/uninstall) should erase and re-create that file (but you'll loose all your containers and images obviously 😄)

@kommen
kommen commented Jun 10, 2016

@thaJeztah thanks for the quick reply!

The space is occupied by this file:
25G /Users/kommen/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux

Yes, uninstalling and reinstalling does remove the file, but it obviously grows again with continued usage. I will report this in the forums.

Thanks again!

@PostalMuttonchops PostalMuttonchops added a commit to PostalMuttonchops/dotfiles that referenced this issue Jun 24, 2016
@PostalMuttonchops PostalMuttonchops shrink-qcow2 added
Because the Mac beta of Docker goes nuts sometimes
(docker/docker#23437)
8f4bbe7
@yakticus

I am running version 1.12.0-a (build: 11213) and still experiencing this issue. Nothing I have tried has changed the size of the file Docker.qcow2 (>41GB), including deleting all containers and removing 141 out of 194 images that were cached locally.

The above commit hints it has been resolved, but it doesn't seem to be. I checked out the aforementioned forum thread but it didn't contain any useful information. Is there a good place to report this issue for docker for mac, other than the forum?

version details:

$ docker version
Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 21:15:28 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 21:15:28 2016
 OS/Arch:      linux/amd64
@thaJeztah
Member

@yakticus we recently opened a separate issue tracker for Docker for Mac; https://github.com/docker/for-mac/issues

@yakticus

Thanks. What's the issue #? I searched for some obvious keywords but couldn't find it in that repo.

@thaJeztah
Member

Oh, I don't know, not sure if there is an issue already for it 😊 @dsheets may know

@yakticus

oh sorry. I read your comment the wrong way. You said "separate issue tracker" and I read "separate issue". The new one is attached (above).

@christophe-f

I barely use Docker and my file size is 61Gb. Crazy

@nroose
nroose commented Jan 2, 2017

Mine was 254GB. Deleted and restarted.

@freedev
freedev commented Jan 13, 2017

57G

@carminexx

Still having this issue. Even if I delete all container and images no disk space is released.
(Note: Docker 1.12.6)

@dsheets
Member
dsheets commented Jan 17, 2017

The disk image resizing feature is still only on the Beta channel. It should reach the stable channel this week or next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment