While setting up a new build machine (CentOS 7, Docker CE 17.12.0-ce), I did a simple test:
docker run -it --rm ubuntu bash
Which worked fine,
You could force-remove it
docker rmi [IMAGE ID] -f
or docker rmi [IMAGE ID] --force
While setting up this system I had originally installed an old version of docker available from the standard CentOS repositories (yum install centos
) instead of adding the docker repositories and installing docker-ce
. Even though I'm on the latest version now, the old one must have introduced some bad data in /var/lib/docker
before I upgraded. In the end I just deleted all the local image and container data and started over:
sudo systemctl stop docker
sudo rm -rf /var/lib/docker
sudo systemctl start docker
Everything is working normally now.