The problem with the FROM instruction when writing Dockerfile.

We all know that when writing Dockerfile , there is only one FROM instruction that indicates the parent image on which it depends.

I now build my own image through the nginx image, which is called my-nginx

.

so, can I build a new image through FROM my-nginx and push to overwrite my-nginx ?

means FROM in Dockerfile . Can you FORM yourself?

Mar.20,2021

docker commit learn about it and add instructions


I don't quite understand what you're talking about?
first of all, how is the image you built?
1. The my-nginx image, you build through nginx image is created through Dockerfile and then docker build's image
2. The my-nginx image, you build through nginx image is created through container, and then docker commit's image
the above two ways build and commit are to build image

Menu