Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker failed to register layer

Tags:

docker

I was trying to pull mysql image with docker pull mysql when my computer got struck. I had to restart my computer, but after restarting and trying to run mysql container with the command docker run -d mysql I am getting the following error:

Unable to find image 'mysql:latest' locally
latest: Pulling from library/mysql
5040bd298390: Pull complete 
55370df68315: Pull complete 
fad5195d69cc: Pull complete 
a1034a5fbbfc: Pull complete 
17f3570b42ae: Pull complete 
6bf4b16e5339: Pull complete 
9700c9731729: Pull complete 
f2fea9c5b632: Pull complete 
2f8101f5336d: Extracting    935 B/935 B
0dc8f8a1031a: Download complete 
a1b9627588c7: Download complete 
docker: failed to register layer: rename /var/lib/docker/image/aufs/layerdb/tmp/layer-721305262 /var/lib/docker/image/aufs/layerdb/sha256/06dd4f9415b3f89d3fb1138623cebb7245affc9410611552c6fb52b091587a2e: directory not empty.
See 'docker run --help'.
3b17db599af1654ddb251295a55988121350a88c8176db24ddfe44f9194edb0c

The docker version is 1.12.3

I reckon the aufs is corrupted because of restart, but I dont know how to fix. Please help. Thanks

like image 293
Romaan Avatar asked Jan 30 '17 03:01

Romaan


1 Answers

Looks like there is a remnant from the past. Delete it:

rm -fr /var/lib/docker/image/aufs/layerdb/sha256/06dd4f9415b3f89d3fb1138623cebb7245affc9410611552c6fb52b091587a2e

Then try:

docker pull mysql
like image 89
Nehal J Wani Avatar answered Sep 19 '22 03:09

Nehal J Wani