I know that the docker image is read-only. Therefore, deleting the file inside base-image within container does not change the size of docker. (result of docker ps -s)
I wanted to reduce image size, but it's already committed, and I can't reduce it. Because committed image is read-only. How can I delete the files inside the image? Or is there a way to commit image read-and-write mode instead of read-only?
The way to achieve it is creating a new image without the file.
After you have deleted the file(s) you want to inside the running container, run:
and
Doing it you will get a new image without those files.
To delete the files:
and delete the files