My deploys take too long. How can I speed them up?

When Aptible builds your app, it needs to run each of the commands in your Dockerfile. We leverage Docker’s built-in caching support, which is described in detail in their docs.

To take full advantage of Docker’s build caching, you should organize the instructions in your Dockerfile so that the most time-consuming build steps are more likely to be cached. For many apps, the dependency installation step is the most time-consuming, and so you’ll want to (a) separate that process from the rest of your Dockerfile instructions, and (b) ensure that it happens early in the Dockerfile.

We’ve got specific instructions and Dockerfile snippets for the following languages and package management systems: