My deploys take too long

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 Docker’s documentation

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 provide specific instructions and Dockerfile snippets for some package managers in our How do I use Dockerfile caching to make builds faster? tutorials.

Note that you can also switch to Direct Docker Image Deploy for full control over your build process.