Docker Community Forums

Share and learn in the Docker community.

Issues with Docker on Windows 10

I have recently started using Docker on Windows 10 and it has been nothing but a frustrating experience.

(a) Why doesn’t docker allow deleting base images or rebasing the child image as the image? I have looked for it everywhere and all the responses given online are nothing but crap, beating around the bush solutions.

  • One personality mentioned that since images are read-only images and docker adds a read/write layer when a container is launched, then why does the parent image show dependencies with a child image if I have created a new image by using docker commit?

(b) Even after system prune and image prune and all sorts of 100 different prunes, the windows docker app doesn’t seem to release the space it has been occupying and only increases manyfold with every commit. Searching for it shows that this issue has been reported many times and the docker developer team had claimed to have resolved it with their update in August 2018, which I have found it is completely untrue.

OS version - Windows 10

Docker version/build - Version 2.0.0.3 (31259)/Build: 8858db3

1 Like

Docker does not allow deleting “base images” because when you create a container, it’s file system is constructed by combining the data contained in the image with the data generated by the container. This way, when you create multiple containers from a single image, each container needs to store only the changes that it has made over each image’s data, and not a full copy of the image data. This saves disk space.

“Parent image show dependencies with a child image” - I cannot understand this statement.

“All sorts of 100 different prunes” - any prune operation will remove unreferenced objects: if an image is referenced by a container, it will not be pruned.

Your problem is neither Docker, nor Windows 10. It’s your frustration. Keep it together, and study the subject further. You won’t be sorry.

(a) “Parent images show dependencies with a child image” - Once I have committed the changes to the container, it creates a new image, which occupies more space than the base image. Since it is already creating an entirely new copy of the image with the container changes overlaid, why doesn’t allow me to delete the old image. It gives the following error:

Error response from daemon: conflict: unable to delete ce39f356087b (cannot be forced) - image has dependent child images

(b) No container is active and in fact, I have removed all the containers. There are no dangling images or containers, I am sure about that. Then why doesn’t system prune/image prune recover the space it has been using. This issue has been going for more than a year with Windows 10 and specifically with using Docker inside WSL.

Thank you for your advice but I have done my part of the study. Let me know if you have any solutions to the problems.

a) An “entirely new copy of the image” is never created. You can verify this by issuing the docker system df command before and after doing a commit. Therefore, every child image is dependent on it’s base image(s).
b) If you have removed containers and images, then the prune commands are unnecessary. Did you also remove volumes? Could you paste the output of the the docker system df command here?
c) While you are at it, could you also paste the output of docker system info?
d) I almost forgot. Do you use Linux containers or Windows containers?

I also use Docker for Windows 10, admittedly part time as most of my work is on Linux. I have not faced space problems - most of my problems have been volume-related, with some sporadic network problems.

You have done good information on this article and You have written well on above topic and also thanks for sharing with us.

Yeah true that!!!

Exporting into a tar and re extracting helped me to remove all the prunes stripping down the image size.