By default, the Astro project Dockerfile only includes aDocumentation Index
Fetch the complete documentation index at: https://astronomer-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
FROM statement that specifies your Astro Runtime version. However, you can extend your Dockerfile to use a different distribution or run additional buildtime arguments. Use this document to learn which Dockerfile customizations are supported both locally and on Astro.
Prerequisites
Use an alternative Astro Runtime distribution
Starting with Astro Runtime 9, each version of Astro Runtime has a separate distribution for each currently supported Python version. Use an alternative Python distribution if any of your dependencies require a Python version other than the default Runtime Python version.Replace
<registry-url>with the Docker registry URL. Airflow 2.x-based Runtime versions and Airflow 3.x-based Runtime versions have different registry URLs. SeeDocker Registry URLsfor information on which URL to pull from.Dockerfile to reference the required distribution:
Run commands on build
To run additional commands as your Astro project is built into a Docker image, add them to yourDockerfile as RUN commands. These commands run as the last step in the image build process.
Replace
<registry-url>with the Docker registry URL. Airflow 2.x-based Runtime versions and Airflow 3.x-based Runtime versions have different registry URLs. SeeDocker Registry URLsfor information on which URL to pull from.ls when your image builds, your Dockerfile would look like this:
Add a CA certificate to an Astro Runtime image
If you need your Astro Deployment to communicate securely with a remote service using a certificate signed by an untrusted or internal certificate authority (CA), you need to add the CA certificate to the trust store inside your Astro project’s Docker image.Replace
<registry-url>with the Docker registry URL. Airflow 2.x-based Runtime versions and Airflow 3.x-based Runtime versions have different registry URLs. SeeDocker Registry URLsfor information on which URL to pull from.-
In your Astro project
Dockerfile, add the CA certificate to the base Runtime image:When using a base image, make sure to install the system level and python packages. -
(Optional) Add additional
COPYstatements before theRUN update-ca-certificatesstanza for each CA certificate your organization is using for external access. - Restart your local environment or deploy to Astro. See Deploy code.