I want to create a docker image with a few customizations. I have an existing image of 16GB and I have launched it as a container. Now I have deleted all the unnecessary files from the container and committed it as a new image. But the new image is still showing 16GB. Actually the new image should have only ~1GB in size.
How can I create a new small size image from a running container? Steps followed:
1) launched a container from the 16GB image
2) deleted unwanted files from the container
3) committed new image from the container
Thanks sarath
If you just need to reduce the size of the existing image, export it using docker export and then import it using docker import.
This question might also help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With