开发者

Why use another person Docker Image?

开发者 https://www.devze.com 2022-12-07 18:45 出处:网络
I\'m learning about Docker architecture. I know that images are made to run applications in containers (virtualization). One thing that I stepped on was that there is an entire community hub for posti

I'm learning about Docker architecture.

I know that images are made to run applications in containers (virtualization). One thing that I stepped on was that there is an entire community hub for posting images. But what is actually the point of doing that?

Isn't the idea of images contain a very specific enviroment with very specific configurations that runs very specific applications?开发者_StackOverflow社区


The idea of images is to have a well-defined environment. The images by the community serve mostly as building blocks or base images for your own, more specific, images. For some applications, you can use an image as-is with maybe a little configuration parameters, but I would guess the more common use case is to start building your specific image based on an already existing, more general image.

Example:

  • You want to create an image with a certain Java application. So you look for an image that already has the Java version you want, and create an image based on that more general image.
  • You want to test your application on different OS versions (maybe different Linux versions). So you create a couple of images, each based on a different base image that already has the OS installed that you are interested in.
0

精彩评论

暂无评论...
验证码 换一张
取 消