Yours isn&#x27;t overly complex, it&#x27;s one way to trim down an image. However, it is a lot more complicated than just defining 1 Dockerfile that at least copies in your package.json file separately to speed up future deploys that don&#x27;t touch your packages.<p>I guess I just don&#x27;t see the time vs. effort value in optimizing most smaller projects.<p>For example, that 75 gem project may take 5 minutes to build once but after that it takes 10 seconds to build and push a version that updates the app code.<p>I&#x27;m ok with this pattern for most of my projects because you can easily get by with 1 host to serve tens of thousands of requests a month on most typical projects. It&#x27;s not like I&#x27;m spinning up and destroying dozens of instances a day where the network overhead is a legit concern (if I were, then I would optimize).