Docker: Combine multiple images

前端 未结 4 1124
春和景丽
春和景丽 2020-11-27 18:27

Is it possible with Docker to combine two images into one?

Like this here:

genericA --
            \\
             ---> specificAB
            /
g         


        
4条回答
  •  独厮守ぢ
    2020-11-27 19:02

    If you do docker commit, it is not handy to see what commands were used in order to build your container, you have to issue a docker history image

    If you have a Dockerfile, just look at it and you see how it was built and what it contains.

    Docker commit is 'by hand', so prone to errors, docker build using a Dockerfile that works is much better.

提交回复
热议问题