Creating your own images
With the mechanism we just saw, we can change everything inside our containers. But what if you want to make sure that your colleagues, partners, or customers get exactly those same modifications without the need to get the my-scripts override right? Or what if you need some DLLs or other files inside your container and want to deliver them as part of your own image? The answer to that is building your own image, which, fortunately, is very easy as well.
Docker has a layering concept that makes an image a stack of layers. All you need to do is put your own layer on top of the standard image. You can do that by using a Dockerfile, which needs a reference to the standard image you want to extend and then the actions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access