Skip to main content

Image Reuse

After the completion of a build process, the outcome is an image intended for deploying your app. To prevent redundant builds, we introduce the concept of "Image Reuse".

With this, our system checks during each new build whether the resulting image is currently under construction or has already been built in another environment. If the image is available, our system reuses it, facilitating quicker deployments with zero build waiting time.

How it Works

A configuration generates each build image. Identical configurations result in identical images.

The build configuration includes details like Git commit hash, Build and Both environment variables (see Build Env Vars for more information), source directory (CLI --dir argument when applicable), root directory (set up in the App settings page), and either the path or the content of the Dockerfile.

All these details are needed for the image reuse feature. For instance, if your deployment process (whether via GitHub or CLI) lacks the Git commit or has uncommitted changes, image reuse won't activate.

Note: Our image reuse process doesn't inspect your app's source code. It only refers to the build configuration, which must include the Git commit hash to enable image reuse.

When a new build starts, our system searches for an existing image with a matching configuration within the account. If a compatible image is found, the build process is skipped, and the existing image is used. If no matching image is available, the system prompts the build process to create a new image.

The detailed workflow is illustrated in the following diagram:

image-reuse-diagram.png

In the Activities sidebar, the status of the illustrated apps in the image above will look this:

  • In the app-prod page:

activities-bar-1.png

  • In the api-prod page:

activities-bar-2.png