AJNOURI / Docker_Certified_Associate_Certification

Preparation for Docker Certified Associate certification exam.
MIT License
4 stars 2 forks source link

docker-compose : cannot remove a container stopped by docker client: removing: device or resource busy #17

Closed AJNOURI closed 6 years ago

AJNOURI commented 6 years ago

I accidently stopped a container started by docker-compose, now I couldn't remove it from either docker or docker-compose:

$ docker-compose down
Removing testdb_myfakesql_1 ... error

ERROR: for testdb_myfakesql_1  Driver aufs failed to remove root filesystem 7ace9f9d55471a4e338cc61971979a2dbffb94f5e9f90760b805a0b576497a47: rename /var/lib/docker/aufs/mnt/c2fca7ae013e977ddb81c5b8113432938587ae4a77dc95274e2ff56fd4f6d054 /var/lib/docker/aufs/mnt/c2fca7ae013e977ddb81c5b8113432938587ae4a77dc95274e2ff56fd4f6d054-removing: device or resource busy
Removing network testdb_default
ajn@~/github/fake-mysql-db/test_db$ docker-compose ps
       Name                    Command             State    Ports
-----------------------------------------------------------------
testdb_myfakesql_1   docker-entrypoint.sh mysqld   Exit 0       
AJNOURI commented 6 years ago

Just restart docker :

$ sudo systemctl restart docker
$ docker-compose ps
Name   Command   State   Ports
------------------------------
$