Failed to register layer: rename - directory not empty

Using: Docker version 1.10.1, build 9e83765
Enviornmemt: MacOS 10.11.3
I am unable to pull an image from the docker repo or from an amazon ecs repo.

The pull starts and the during extraction the following error occurs:

$ docker pull debian
Using default tag: latest
latest: Pulling from library/debian
7268d8f794c4: Extracting [==================================================>] 51.37 MB/51.37 MB
a3ed95caeb02: Download complete
failed to register layer: rename /mnt/sda1/var/lib/docker/image/aufs/layerdb/tmp/layer-631253981 /mnt/sda1/var/lib/docker/image/aufs/layerdb/sha256/ddef881aeaffef528aa8fecd090a9b68dd4fabb6f653c3c1b689c133b07e38b0: directory not empty
1 Like

Same issue here… have you solved this problem?

Hey! I just solved it by recreating my docker machine (default):

$ docker-machine stop default
$ docker-machine rm default
$ docker-machine create --driver virtualbox default

I’m currently getting this with Docker for Mac beta Version 1.11.2-beta15 (build: 9168)
both docker images and docker ps come up empty.

Update: Reseting defaults fixed this for me.

  1. Docker icon > Preferences > Uninstall / Reset > Reset to Factory defaults
2 Likes

Same for me on Docker for Mac beta Version 1.12.0-beta-rc2-beta16 (build: 9493). Removing all images and containers manually didn’t help, Reset to Factory defaults worked.

+1 This worked for me also, lots of the help out there is for the VM version. Nearly gave up before I found this!

This factory resetting worked for me as well

I fixed it by the error suggested: “director not empty”, then go delete everything under that directory.

You can do by running those command to clean up the folder:
$ docker-machine ssh
docker@default$ sudo su
root@default$ cd /mnt/sda1/var/lib/docker/image/aufs/layerdb/sha256/ddef881aeaffef528aa8fecd090a9b68dd4fabb6f653c3c1b689c133b07e38b0
root@default$ rm -rf ./*

Then it works for me.