Publishing the image¶
Once your Dockerfile or docker build command is ready - see Quick start - build the image,
test it and make it available to your deployment.
Build the image with
docker(or another tool such aspodmanorkaniko), tagging it with your own name and version. If you publish it to a registry, the name usually has the formregistry/image-name:docker build . -f Dockerfile --pull --tag my-image:0.0.1
Optionally, test the image. If you have Airflow sources checked out, run this from their root folder; the output tells you whether the image is good to go:
./scripts/ci/tools/verify_docker_image.sh PROD my-image:0.0.1
Make the image available to your deployment:
With Running Airflow in Docker, set the
AIRFLOW_IMAGE_NAMEvariable to your image, or let Docker Compose build it: indocker-compose.yaml, search for “In order to add custom dependencies”, comment theimageline out, uncomment thebuildline and rundocker compose build.Development Kubernetes clusters such as
kindorminikubecan load a local image directly with theirloadcommands.In all other cases, push the image to a registry and set its name in your deployment - for example in the Helm Chart for Apache Airflow.