I found out that docker image is read-only. Is there a way to save the image writable?
The reason why I post this question is because I want to modify the original image. Delete or Update from the base image inside container.
CodePudding user response:
When you build an image it is immutable but if you want to modify something from an other image you can create a Dockerfile from an image that you want to modify with FROM command.
With RUN, COPY and other commands you can create your personal image.
What kind of changes do you want to do?
CodePudding user response:
When working with Docker images and containers, one of the basic features is committing changes to a Docker image. When you commit to changes, you essentially create a new image with an additional layer that modifies the base image layer.
Create a new image by committing the changes using the following syntax:
sudo docker commit [CONTAINER_ID] [new_image_name]
I hope this answer help you.