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.

  1. Build the image with docker (or another tool such as podman or kaniko), tagging it with your own name and version. If you publish it to a registry, the name usually has the form registry/image-name:

    docker build . -f Dockerfile --pull --tag my-image:0.0.1
    
  2. 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
    
  3. Make the image available to your deployment:

    • With Running Airflow in Docker, set the AIRFLOW_IMAGE_NAME variable to your image, or let Docker Compose build it: in docker-compose.yaml, search for “In order to add custom dependencies”, comment the image line out, uncomment the build line and run docker compose build.

    • Development Kubernetes clusters such as kind or minikube can load a local image directly with their load commands.

    • 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.

Was this entry helpful?