'How to make an image of application based on docker-compose (based on several images)?

When I started learning docker, I thought that docker works like constructor: you take image(s), put some code over it, and then you can build an image for further using. And it works so with apps based on one image through the Dockerfile. But when we starting talk about apps which based on several images, everybody talks about docker-compose and how it useful and so on, but I couldn't find any information about how to make an image, which takes all our new code and settings, like we did it with Dockerfile. How can I do this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source