My suggestion is to build a package installer for your app and use that to build the final image. For example, we use fpm (running in a container) to build .deb packages, then we push those to an apt repository (artifactory) and then build images downstream using apt-get.<p>Initially we did a lot of cloning from source and compiling&#x2F;installing dependencies, but it&#x27;s very slow, there&#x27;s a lot of wasted time in rebuilding identical code, and it&#x27;s hard to provide patches and upgrades to customers.