# Customize Nginx Static runtime environment ## Build Custom Runtime Images Zerops allows you to build custom runtime images (CRI) when the default base runtime images don't meet your Nginx Static application's requirements. This is an optional phase in the [build and deploy pipeline](/features/pipeline#runtime-prepare-phase-optional). :::important You should not include your application code in the custom runtime image, as your built/packaged code is deployed automatically into fresh containers. ::: ## Configuration ### Default Nginx Static Runtime Environment The default Nginx Static runtime environment contains: - Alpine 3.20 - Selected version of Nginx when the runtime service was created - [zCLI](/references/cli) - Git ### When You Need a Custom Runtime Image If your Nginx Static service needs additional tools beyond the default environment (SSL management, monitoring, security tools, etc.), you'll need to build a custom runtime image. Here are Nginx Static-specific examples of configuring custom runtime images in your `zerops.yml`: ### Basic Nginx Static Setup For complete configuration details, see the [runtime prepare phase configuration guide](/features/pipeline#configuration). ## Process and Caching ### How Runtime Prepare Works The runtime prepare process follows the same steps for all runtimes. See [how runtime prepare works](/features/pipeline#how-it-works) for the complete process details. ### Caching Behavior Zerops caches custom runtime images to optimize deployment times. Learn about [custom runtime image caching](/features/pipeline#custom-runtime-image-caching) including when images are cached and reused. ### Build Management For information about managing builds and deployments, see [managing builds and deployments](/features/pipeline#manage-builds-and-deployments). :::warning Shared storage mounts are not available during the runtime prepare phase. ::: ## Troubleshooting If your `prepareCommands` fail, check the [prepare runtime log](/nginx/how-to/logs#prepare-runtime-log) for specific error messages.