Deploy with Image
On creating a new app, you can choose to use a custom image to deploy your app. With this, the build step is skipped, and the image you provide is used to run your app.
Using a Custom Docker Image
On the app creation page, in the section Configure application
you can select the Use image
option (ensure you are using the CLI method to create the app).
After selecting the option, you will be prompted to provide the image name.
This field is optional, and you can leave it blank if you want to provide the image name later or via CLI (using --image
argument):
zcloud deploy --user-token <token> --env <env-name> --image <image-name>
Note: The provided image should be built for the architecture
linux/amd64
to run on our platform.
Changing the Image
You can change the image used to run your app by updating the image name in the app settings or using the CLI:
On App edit page:
Using CLI:
zcloud deploy ... --image <new-image>
Each time you change the image, the app will be redeployed using the new image and a new environment version will be created.
Reusing an Existing App Image
You can deploy using an image from an existing app, which is useful when deploying the same image to multiple environments. This option is currently only available via the web interface and only for apps not deployed using GitHub.
To do this, go to the app environment page and click on the Deploy Image
button in the Activities sidebar.
A modal will appear showing all images in your account. Select the image you want to deploy and click the Deploy
button.
Once you click the Deploy
button, a new version of the environment will be created using the selected image.
Note: You may see an indicator of "Build changes." This happens because the build step is skipped, so your build configuration is not applied.
Private Images
If you are using an image from a private registry, you can provide the credentials to access the image.
You can provide the credentials in the My account
page under the Container Registry
tab. Read more about it here.
It is important to note that images built in your account will not be sent to this registry. The credentials will only be used to download the images during deployment. However, if you would like to send your built images to the registry, please contact our support team.