You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2022/02/28 19:35:07 UTC

[airflow] 01/01: Revert "Switch to Debian 11 (bullseye) as base for our dockerfiles (#21378)"

This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch revert-21378-switch-to-bullseye
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 1fee430521a0b8c7fad89654a9942cf1395ff14b
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Mon Feb 28 19:34:18 2022 +0000

    Revert "Switch to Debian 11 (bullseye) as base for our dockerfiles (#21378)"
    
    This reverts commit 5d89dea56843d7b76d5e308e373ba16ecbcffa77.
---
 .github/workflows/build-images.yml                     |  1 -
 .github/workflows/ci.yml                               |  1 -
 BREEZE.rst                                             | 16 ++++++++--------
 CI.rst                                                 |  4 ++--
 Dockerfile                                             |  2 +-
 Dockerfile.ci                                          |  2 +-
 IMAGES.rst                                             | 18 +++++++++---------
 README.md                                              |  2 +-
 TESTING.rst                                            |  2 +-
 .../tutorial_taskflow_api_etl_docker_virtualenv.py     |  2 +-
 breeze-complete                                        |  2 +-
 chart/values.schema.json                               |  2 +-
 chart/values.yaml                                      |  2 +-
 .../0004-using-docker-images-as-test-environment.md    |  2 +-
 dev/breeze/src/airflow_breeze/ci/build_params.py       |  4 ++--
 .../apache-airflow-providers-odbc/connections/odbc.rst |  6 +++---
 docs/apache-airflow/howto/set-up-database.rst          |  2 +-
 docs/apache-airflow/installation/dependencies.rst      |  2 +-
 docs/apache-airflow/installation/prerequisites.rst     |  2 +-
 docs/apache-airflow/start/docker.rst                   |  2 +-
 docs/docker-stack/build-arg-ref.rst                    |  2 +-
 docs/docker-stack/build.rst                            |  4 ++--
 .../customizing/add-build-essential-custom.sh          |  2 +-
 .../docker-examples/customizing/custom-sources.sh      |  2 +-
 .../customizing/github-different-repository.sh         |  2 +-
 .../docker-examples/customizing/github-main.sh         |  2 +-
 .../docker-examples/customizing/github-v2-2-test.sh    |  2 +-
 .../customizing/pypi-dev-runtime-deps.sh               |  2 +-
 .../customizing/pypi-extras-and-deps.sh                |  2 +-
 .../customizing/pypi-selected-version.sh               |  2 +-
 .../restricted/restricted_environments.sh              |  2 +-
 scripts/ci/libraries/_initialization.sh                |  2 +-
 32 files changed, 50 insertions(+), 52 deletions(-)

diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml
index 636b921..3d77b51 100644
--- a/.github/workflows/build-images.yml
+++ b/.github/workflows/build-images.yml
@@ -31,7 +31,6 @@ env:
   FORCE_ANSWER_TO_QUESTIONS: "yes"
   CHECK_IMAGE_FOR_REBUILD: "true"
   SKIP_CHECK_REMOTE_IMAGE: "true"
-  DEBIAN_VERSION: "bullseye"
   DB_RESET: "true"
   VERBOSE: "true"
   GITHUB_REPOSITORY: ${{ github.repository }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e951a89..ccf11a2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -32,7 +32,6 @@ env:
   FORCE_ANSWER_TO_QUESTIONS: "yes"
   CHECK_IMAGE_FOR_REBUILD: "true"
   SKIP_CHECK_REMOTE_IMAGE: "true"
-  DEBIAN_VERSION: "bullseye"
   DB_RESET: "true"
   VERBOSE: "true"
   DOCKER_CACHE: "pulled"
diff --git a/BREEZE.rst b/BREEZE.rst
index 0a81c7c..2352ade 100644
--- a/BREEZE.rst
+++ b/BREEZE.rst
@@ -1285,7 +1285,7 @@ This is the current syntax for  `./breeze <./breeze>`_:
 
           One of:
 
-                 bullseye buster
+                 buster bullseye
 
   -a, --install-airflow-version INSTALL_AIRFLOW_VERSION
           Uses different version of Airflow when building PROD image.
@@ -1500,7 +1500,7 @@ This is the current syntax for  `./breeze <./breeze>`_:
 
           One of:
 
-                 bullseye buster
+                 buster bullseye
 
   -a, --install-airflow-version INSTALL_AIRFLOW_VERSION
           Uses different version of Airflow when building PROD image.
@@ -1575,7 +1575,7 @@ This is the current syntax for  `./breeze <./breeze>`_:
 
           One of:
 
-                 bullseye buster
+                 buster bullseye
 
   -I, --production-image
           Use production image for entering the environment and builds (not for tests).
@@ -1657,7 +1657,7 @@ This is the current syntax for  `./breeze <./breeze>`_:
 
           One of:
 
-                 bullseye buster
+                 buster bullseye
 
   -v, --verbose
           Show verbose information about executed docker, kind, kubectl, helm commands. Useful for
@@ -1708,7 +1708,7 @@ This is the current syntax for  `./breeze <./breeze>`_:
 
           One of:
 
-                 bullseye buster
+                 buster bullseye
 
 
   ####################################################################################################
@@ -1918,7 +1918,7 @@ This is the current syntax for  `./breeze <./breeze>`_:
 
           One of:
 
-                 bullseye buster
+                 buster bullseye
 
   -b, --backend BACKEND
           Backend to use for tests - it determines which database is used.
@@ -2002,7 +2002,7 @@ This is the current syntax for  `./breeze <./breeze>`_:
 
           One of:
 
-                 bullseye buster
+                 buster bullseye
 
   -F, --force-build-images
           Forces building of the local docker images. The images are rebuilt
@@ -2416,7 +2416,7 @@ This is the current syntax for  `./breeze <./breeze>`_:
 
           One of:
 
-                 bullseye buster
+                 buster bullseye
 
   ****************************************************************************************************
    Choose backend to run for Airflow
diff --git a/CI.rst b/CI.rst
index 5c32174..6a9a409 100644
--- a/CI.rst
+++ b/CI.rst
@@ -607,11 +607,11 @@ have to be percent-encoded when you access them via UI (/ = %2F)
 +--------------+----------------------------------------------------------+----------------------------------------------------------+
 | Image        | Name:tag (both cases latest version and per-build)       | Description                                              |
 +==============+==========================================================+==========================================================+
-| Python image | python:<X.Y>-slim-bullseye                               | Base Python image used by both production and CI image.  |
+| Python image | python:<X.Y>-slim-buster                                 | Base Python image used by both production and CI image.  |
 | (DockerHub)  |                                                          | Python maintainer release new versions of those image    |
 |              |                                                          | with security fixes every few weeks in DockerHub.        |
 +--------------+----------------------------------------------------------+----------------------------------------------------------+
-| Airflow      | airflow/<BRANCH>/python:<X.Y>-slim-bullseye              | Version of python base image used in Airflow Builds      |
+| Airflow      | airflow/<BRANCH>/python:<X.Y>-slim-buster                | Version of python base image used in Airflow Builds      |
 | python base  |                                                          | We keep the "latest" version only to mark last "good"    |
 | image        |                                                          | python base that went through testing and was pushed.    |
 +--------------+----------------------------------------------------------+----------------------------------------------------------+
diff --git a/Dockerfile b/Dockerfile
index d164c8d..269059c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -46,7 +46,7 @@ ARG AIRFLOW_USER_HOME_DIR=/home/airflow
 # latest released version here
 ARG AIRFLOW_VERSION="2.2.3"
 
-ARG PYTHON_BASE_IMAGE="python:3.7-slim-bullseye"
+ARG PYTHON_BASE_IMAGE="python:3.7-slim-buster"
 
 ARG AIRFLOW_PIP_VERSION=22.0.3
 ARG AIRFLOW_IMAGE_REPOSITORY="https://github.com/apache/airflow"
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 49d5f85..005ee8c 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -15,7 +15,7 @@
 #
 # WARNING: THIS DOCKERFILE IS NOT INTENDED FOR PRODUCTION USE OR DEPLOYMENT.
 #
-ARG PYTHON_BASE_IMAGE="python:3.7-slim-bullseye"
+ARG PYTHON_BASE_IMAGE="python:3.7-slim-buster"
 FROM ${PYTHON_BASE_IMAGE} as main
 
 # Nolog bash flag is currently ignored - but you can replace it with other flags (for example
diff --git a/IMAGES.rst b/IMAGES.rst
index e1dec6c..23de4b8 100644
--- a/IMAGES.rst
+++ b/IMAGES.rst
@@ -318,7 +318,7 @@ It is recommended to build images with ``DOCKER_BUILDKIT=1`` variable
 
   DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
     --pull \
-    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
+    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
     --build-arg ADDITIONAL_AIRFLOW_EXTRAS="jdbc"
     --build-arg ADDITIONAL_PYTHON_DEPS="pandas"
     --build-arg ADDITIONAL_DEV_APT_DEPS="gcc g++"
@@ -344,7 +344,7 @@ based on example in `this comment <https://github.com/apache/airflow/issues/8605
 
   DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
     --pull \
-    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
+    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
     --build-arg AIRFLOW_INSTALLATION_METHOD="apache-airflow" \
     --build-arg ADDITIONAL_AIRFLOW_EXTRAS="slack" \
     --build-arg ADDITIONAL_PYTHON_DEPS="apache-airflow-providers-odbc \
@@ -372,7 +372,7 @@ The following build arguments (``--build-arg`` in docker build command) can be u
 +------------------------------------------+------------------------------------------+------------------------------------------+
 | Build argument                           | Default value                            | Description                              |
 +==========================================+==========================================+==========================================+
-| ``PYTHON_BASE_IMAGE``                    | ``python:3.7-slim-bullseye``             | Base Python image                        |
+| ``PYTHON_BASE_IMAGE``                    | ``python:3.7-slim-buster``               | Base Python image                        |
 +------------------------------------------+------------------------------------------+------------------------------------------+
 | ``PYTHON_MAJOR_MINOR_VERSION``           | ``3.6``                                  | major/minor version of Python (should    |
 |                                          |                                          | match base image)                        |
@@ -489,7 +489,7 @@ This builds the CI image in version 3.7 with default extras ("all").
 
   DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
      --pull \
-     --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" --tag my-image:0.0.1
+     --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" --tag my-image:0.0.1
 
 
 This builds the CI image in version 3.6 with "gcp" extra only.
@@ -498,7 +498,7 @@ This builds the CI image in version 3.6 with "gcp" extra only.
 
   DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
     --pull \
-    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
+    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
     --build-arg AIRFLOW_EXTRAS=gcp --tag my-image:0.0.1
 
 
@@ -508,7 +508,7 @@ This builds the CI image in version 3.6 with "apache-beam" extra added.
 
   DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
     --pull \
-    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
+    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
     --build-arg ADDITIONAL_AIRFLOW_EXTRAS="apache-beam" --tag my-image:0.0.1
 
 This builds the CI image in version 3.6 with "mssql" additional package added.
@@ -517,7 +517,7 @@ This builds the CI image in version 3.6 with "mssql" additional package added.
 
   DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
     --pull \
-    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
+    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
     --build-arg ADDITIONAL_PYTHON_DEPS="mssql" --tag my-image:0.0.1
 
 This builds the CI image in version 3.6 with "gcc" and "g++" additional apt dev dependencies added.
@@ -526,7 +526,7 @@ This builds the CI image in version 3.6 with "gcc" and "g++" additional apt dev
 
   DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
     --pull
-    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
+    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
     --build-arg ADDITIONAL_DEV_APT_DEPS="gcc g++" --tag my-image:0.0.1
 
 This builds the CI image in version 3.6 with "jdbc" extra and "default-jre-headless" additional apt runtime dependencies added.
@@ -535,7 +535,7 @@ This builds the CI image in version 3.6 with "jdbc" extra and "default-jre-headl
 
   DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
     --pull \
-    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
+    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
     --build-arg AIRFLOW_EXTRAS=jdbc --build-arg ADDITIONAL_RUNTIME_DEPS="default-jre-headless" \
     --tag my-image:0.0.1
 
diff --git a/README.md b/README.md
index e27c4f3..a710dc1 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,7 @@ The work to add Windows support is tracked via [#10388](https://github.com/apach
 it is not a high priority. You should only use Linux-based distros as "Production" execution environment
 as this is the only environment that is supported. The only distro that is used in our CI tests and that
 is used in the [Community managed DockerHub image](https://hub.docker.com/p/apache/airflow) is
-`Debian Bullseye`.
+`Debian Buster`.
 
 ## Getting started
 
diff --git a/TESTING.rst b/TESTING.rst
index 24cb63d..737c760 100644
--- a/TESTING.rst
+++ b/TESTING.rst
@@ -1248,7 +1248,7 @@ Below are the steps you need to take to set up your virtual machine in the Googl
         --zone="${GCP_ZONE}" \
         --machine-type=f1-micro \
         --subnet="${GCP_NETWORK_NAME}" \
-        --image=debian-11-bullseye-v20220120 \
+        --image=debian-10-buster-v20200210 \
         --image-project=debian-cloud \
         --preemptible
 
diff --git a/airflow/providers/docker/example_dags/tutorial_taskflow_api_etl_docker_virtualenv.py b/airflow/providers/docker/example_dags/tutorial_taskflow_api_etl_docker_virtualenv.py
index c16588c..1961c30 100644
--- a/airflow/providers/docker/example_dags/tutorial_taskflow_api_etl_docker_virtualenv.py
+++ b/airflow/providers/docker/example_dags/tutorial_taskflow_api_etl_docker_virtualenv.py
@@ -62,7 +62,7 @@ def tutorial_taskflow_api_etl_docker_virtualenv():
     # [END extract_virtualenv]
 
     # [START transform_docker]
-    @task.docker(image='python:3.9-slim-bullseye', multiple_outputs=True)
+    @task.docker(image='python:3.9-slim-buster', multiple_outputs=True)
     def transform(order_data_dict: dict):
         """
         #### Transform task
diff --git a/breeze-complete b/breeze-complete
index 2a984ef..2733e63 100644
--- a/breeze-complete
+++ b/breeze-complete
@@ -23,7 +23,7 @@
 # Those cannot be made read-only as the breeze-complete must be re-sourceable
 
 _breeze_allowed_python_major_minor_versions="3.7 3.8 3.9"
-_breeze_allowed_debian_versions="bullseye buster"
+_breeze_allowed_debian_versions="buster bullseye"
 _breeze_allowed_backends="sqlite mysql postgres mssql"
 _breeze_allowed_integrations="cassandra kerberos mongo openldap pinot rabbitmq redis statsd trino all"
 _breeze_allowed_generate_constraints_modes="source-providers pypi-providers no-providers"
diff --git a/chart/values.schema.json b/chart/values.schema.json
index 8deca82..1cd46b8 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -568,7 +568,7 @@
                         "tag": {
                             "description": "The redis image tag.",
                             "type": "string",
-                            "default": "6-bullseye"
+                            "default": "6-buster"
                         },
                         "pullPolicy": {
                             "description": "The redis image pull policy.",
diff --git a/chart/values.yaml b/chart/values.yaml
index 4c43a2a..2fc50fa 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -78,7 +78,7 @@ images:
     pullPolicy: IfNotPresent
   redis:
     repository: redis
-    tag: 6-bullseye
+    tag: 6-buster
     pullPolicy: IfNotPresent
   pgbouncer:
     repository: apache/airflow
diff --git a/dev/breeze/doc/adr/0004-using-docker-images-as-test-environment.md b/dev/breeze/doc/adr/0004-using-docker-images-as-test-environment.md
index 4acb1c3..1ce4c05 100644
--- a/dev/breeze/doc/adr/0004-using-docker-images-as-test-environment.md
+++ b/dev/breeze/doc/adr/0004-using-docker-images-as-test-environment.md
@@ -120,7 +120,7 @@ suited for the job:
 * management and automated synchronisation of the environment can be easily done using simple, external
   scripts that will check the "freshness" of the images and propose corrective actions (pulling or
   rebuilding the image) for the user whenever they are needed (all that in cross-platform way)
-* we can use specific base image (Debian Bullseye with Long Term Support) and rely on security fixes provided
+* we can use specific base image (Debian Buster with Long Term Support) and rely on security fixes provided
   by Debian for system dependencies.
 
 The only alternative considered is a plain virtualenv managed individually by each user. The problem with
diff --git a/dev/breeze/src/airflow_breeze/ci/build_params.py b/dev/breeze/src/airflow_breeze/ci/build_params.py
index 0e19632..82a5951 100644
--- a/dev/breeze/src/airflow_breeze/ci/build_params.py
+++ b/dev/breeze/src/airflow_breeze/ci/build_params.py
@@ -77,8 +77,8 @@ class BuildParams:
     @property
     def python_base_image(self):
         """Construct Python Base Image"""
-        #  ghcr.io/apache/airflow/main/python:3.8-slim-bullseye
-        return f'{self.airflow_image_name}/{self.airflow_branch}/python:{self.python_version}-slim-bullseye'
+        #  ghcr.io/apache/airflow/main/python:3.8-slim-buster
+        return f'{self.airflow_image_name}/{self.airflow_branch}/python:{self.python_version}-slim-buster'
 
     @property
     def airflow_ci_local_manifest_image(self):
diff --git a/docs/apache-airflow-providers-odbc/connections/odbc.rst b/docs/apache-airflow-providers-odbc/connections/odbc.rst
index 5d71559..e4bd83c 100644
--- a/docs/apache-airflow-providers-odbc/connections/odbc.rst
+++ b/docs/apache-airflow-providers-odbc/connections/odbc.rst
@@ -78,7 +78,7 @@ Extra (optional)
     .. code-block:: json
 
         {
-          "Driver": "ODBC Driver 18 for SQL Server",
+          "Driver": "ODBC Driver 17 for SQL Server",
           "ApplicationIntent": "ReadOnly",
           "TrustedConnection": "Yes"
         }
@@ -96,7 +96,7 @@ Extra (optional)
 
     .. code-block:: bash
 
-        export AIRFLOW_CONN_MSSQL_DEFAULT='mssql-odbc://my_user:XXXXXXXXXXXX@1.1.1.1:1433/my_database?Driver=ODBC+Driver+18+for+SQL+Server&ApplicationIntent=ReadOnly&TrustedConnection=Yes'
+        export AIRFLOW_CONN_MSSQL_DEFAULT='mssql-odbc://my_user:XXXXXXXXXXXX@1.1.1.1:1433/my_database?Driver=ODBC+Driver+17+for+SQL+Server&ApplicationIntent=ReadOnly&TrustedConnection=Yes'
 
     If you want to pass keyword arguments to ``pyodbc.connect``, you may supply a dictionary
     under ``connect_kwargs``.
@@ -107,7 +107,7 @@ Extra (optional)
     .. code-block:: json
 
         {
-          "Driver": "ODBC Driver 18 for SQL Server",
+          "Driver": "ODBC Driver 17 for SQL Server",
           "ApplicationIntent": "ReadOnly",
           "TrustedConnection": "Yes",
           "connect_kwargs": {
diff --git a/docs/apache-airflow/howto/set-up-database.rst b/docs/apache-airflow/howto/set-up-database.rst
index 2ca8cb9..c1e6ccb 100644
--- a/docs/apache-airflow/howto/set-up-database.rst
+++ b/docs/apache-airflow/howto/set-up-database.rst
@@ -324,7 +324,7 @@ Official Docker image we have ODBC driver installed, so you need to specify the
 
 .. code-block:: text
 
-    mssql+pyodbc://<user>:<password>@<host>[:port]/<db>[?driver=ODBC+Driver+18+for+SQL+Server]
+    mssql+pyodbc://<user>:<password>@<host>[:port]/<db>[?driver=ODBC+Driver+17+for+SQL+Server]
 
 
 Other configuration options
diff --git a/docs/apache-airflow/installation/dependencies.rst b/docs/apache-airflow/installation/dependencies.rst
index 912cb4e..a5bd2e7 100644
--- a/docs/apache-airflow/installation/dependencies.rst
+++ b/docs/apache-airflow/installation/dependencies.rst
@@ -71,7 +71,7 @@ System dependencies
 '''''''''''''''''''
 
 You need certain system level requirements in order to install Airflow. Those are requirements that are known
-to be needed for Linux system (Tested on Ubuntu Bullseye LTS) :
+to be needed for Linux system (Tested on Ubuntu Buster LTS) :
 
 .. code-block:: bash
 
diff --git a/docs/apache-airflow/installation/prerequisites.rst b/docs/apache-airflow/installation/prerequisites.rst
index 2bb76af..5b878ec 100644
--- a/docs/apache-airflow/installation/prerequisites.rst
+++ b/docs/apache-airflow/installation/prerequisites.rst
@@ -51,4 +51,4 @@ The work to add Windows support is tracked via `#10388 <https://github.com/apach
 it is not a high priority. You should only use Linux-based distros as "Production" execution environment
 as this is the only environment that is supported. The only distro that is used in our CI tests and that
 is used in the `Community managed DockerHub image <https://hub.docker.com/p/apache/airflow>`__ is
-``Debian Bullseye``.
+``Debian Buster``.
diff --git a/docs/apache-airflow/start/docker.rst b/docs/apache-airflow/start/docker.rst
index fbab8ff..377ef99 100644
--- a/docs/apache-airflow/start/docker.rst
+++ b/docs/apache-airflow/start/docker.rst
@@ -57,7 +57,7 @@ Older versions of ``docker-compose`` do not support all the features required by
 
     .. code-block:: bash
 
-        docker run --rm "debian:bullseye-slim" bash -c 'numfmt --to iec $(echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE))))'
+        docker run --rm "debian:buster-slim" bash -c 'numfmt --to iec $(echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE))))'
 
 
 ``docker-compose.yaml``
diff --git a/docs/docker-stack/build-arg-ref.rst b/docs/docker-stack/build-arg-ref.rst
index 23f2b3b..aa40154 100644
--- a/docs/docker-stack/build-arg-ref.rst
+++ b/docs/docker-stack/build-arg-ref.rst
@@ -30,7 +30,7 @@ Those are the most common arguments that you use when you want to build a custom
 +------------------------------------------+------------------------------------------+---------------------------------------------+
 | Build argument                           | Default value                            | Description                                 |
 +==========================================+==========================================+=============================================+
-| ``PYTHON_BASE_IMAGE``                    | ``python:3.7-slim-bullseye``             | Base python image.                          |
+| ``PYTHON_BASE_IMAGE``                    | ``python:3.7-slim-buster``               | Base python image.                          |
 +------------------------------------------+------------------------------------------+---------------------------------------------+
 | ``AIRFLOW_VERSION``                      | :subst-code:`|airflow-version|`          | version of Airflow.                         |
 +------------------------------------------+------------------------------------------+---------------------------------------------+
diff --git a/docs/docker-stack/build.rst b/docs/docker-stack/build.rst
index 9abbdce..131ccaf 100644
--- a/docs/docker-stack/build.rst
+++ b/docs/docker-stack/build.rst
@@ -416,8 +416,8 @@ to make sure to update those requirements and rebuild the images to account for
 Choosing Debian version when customizing the image
 --------------------------------------------------
 
-The reference Airflow image currently uses ``bullseye`` version of Debian (also known as Debian 10) as base
-image, however when you want to build a custom image, you can also use ``buster`` version of base images.
+The reference Airflow image currently uses ``buster`` version of Debian (also known as Debian 10) as base
+image, however when you want to build a custom image, you can also use ``bullseye`` version of base images.
 Airflow supports both versions of Debian. You choose which version of Debian to use by choosing the
 right version of python base image:
 
diff --git a/docs/docker-stack/docker-examples/customizing/add-build-essential-custom.sh b/docs/docker-stack/docker-examples/customizing/add-build-essential-custom.sh
index 34ff61d..743a068 100755
--- a/docs/docker-stack/docker-examples/customizing/add-build-essential-custom.sh
+++ b/docs/docker-stack/docker-examples/customizing/add-build-essential-custom.sh
@@ -23,7 +23,7 @@ cd "${AIRFLOW_SOURCES}"
 
 # [START build]
 export AIRFLOW_VERSION=2.2.2
-export DEBIAN_VERSION="bullseye"
+export DEBIAN_VERSION="buster"
 
 docker build . \
     --pull \
diff --git a/docs/docker-stack/docker-examples/customizing/custom-sources.sh b/docs/docker-stack/docker-examples/customizing/custom-sources.sh
index 47842bb..829545f 100755
--- a/docs/docker-stack/docker-examples/customizing/custom-sources.sh
+++ b/docs/docker-stack/docker-examples/customizing/custom-sources.sh
@@ -23,7 +23,7 @@ cd "${AIRFLOW_SOURCES}"
 
 # [START build]
 export AIRFLOW_VERSION=2.2.2
-export DEBIAN_VERSION="bullseye"
+export DEBIAN_VERSION="buster"
 
 docker build . -f Dockerfile \
     --pull \
diff --git a/docs/docker-stack/docker-examples/customizing/github-different-repository.sh b/docs/docker-stack/docker-examples/customizing/github-different-repository.sh
index 4c251eb..93c590c 100755
--- a/docs/docker-stack/docker-examples/customizing/github-different-repository.sh
+++ b/docs/docker-stack/docker-examples/customizing/github-different-repository.sh
@@ -21,7 +21,7 @@ set -euo pipefail
 AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../" && pwd)"
 cd "${AIRFLOW_SOURCES}"
 # [START build]
-export DEBIAN_VERSION="bullseye"
+export DEBIAN_VERSION="buster"
 
 docker build . \
     --pull \
diff --git a/docs/docker-stack/docker-examples/customizing/github-main.sh b/docs/docker-stack/docker-examples/customizing/github-main.sh
index afd6740..1bdf32a 100755
--- a/docs/docker-stack/docker-examples/customizing/github-main.sh
+++ b/docs/docker-stack/docker-examples/customizing/github-main.sh
@@ -22,7 +22,7 @@ AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../" && pwd)"
 cd "${AIRFLOW_SOURCES}"
 
 # [START build]
-export DEBIAN_VERSION="bullseye"
+export DEBIAN_VERSION="buster"
 
 docker build . \
     --pull \
diff --git a/docs/docker-stack/docker-examples/customizing/github-v2-2-test.sh b/docs/docker-stack/docker-examples/customizing/github-v2-2-test.sh
index 6c70edd..1051450 100755
--- a/docs/docker-stack/docker-examples/customizing/github-v2-2-test.sh
+++ b/docs/docker-stack/docker-examples/customizing/github-v2-2-test.sh
@@ -22,7 +22,7 @@ AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../" && pwd)"
 cd "${AIRFLOW_SOURCES}"
 
 # [START build]
-export DEBIAN_VERSION="bullseye"
+export DEBIAN_VERSION="buster"
 docker build . \
     --pull \
     --build-arg PYTHON_BASE_IMAGE="python:3.8-slim-${DEBIAN_VERSION}" \
diff --git a/docs/docker-stack/docker-examples/customizing/pypi-dev-runtime-deps.sh b/docs/docker-stack/docker-examples/customizing/pypi-dev-runtime-deps.sh
index d6d06b6..06ac690 100755
--- a/docs/docker-stack/docker-examples/customizing/pypi-dev-runtime-deps.sh
+++ b/docs/docker-stack/docker-examples/customizing/pypi-dev-runtime-deps.sh
@@ -23,7 +23,7 @@ cd "${AIRFLOW_SOURCES}"
 
 # [START build]
 export AIRFLOW_VERSION=2.2.2
-export DEBIAN_VERSION="bullseye"
+export DEBIAN_VERSION="buster"
 
 docker build . \
     --pull \
diff --git a/docs/docker-stack/docker-examples/customizing/pypi-extras-and-deps.sh b/docs/docker-stack/docker-examples/customizing/pypi-extras-and-deps.sh
index d0fe2fe..3e9a1a1 100755
--- a/docs/docker-stack/docker-examples/customizing/pypi-extras-and-deps.sh
+++ b/docs/docker-stack/docker-examples/customizing/pypi-extras-and-deps.sh
@@ -23,7 +23,7 @@ cd "${AIRFLOW_SOURCES}"
 
 # [START build]
 export AIRFLOW_VERSION=2.2.2
-export DEBIAN_VERSION="bullseye"
+export DEBIAN_VERSION="buster"
 
 docker build . \
     --pull \
diff --git a/docs/docker-stack/docker-examples/customizing/pypi-selected-version.sh b/docs/docker-stack/docker-examples/customizing/pypi-selected-version.sh
index 21abbb4..aa4ddf1 100755
--- a/docs/docker-stack/docker-examples/customizing/pypi-selected-version.sh
+++ b/docs/docker-stack/docker-examples/customizing/pypi-selected-version.sh
@@ -26,7 +26,7 @@ export AIRFLOW_VERSION=2.2.2
 
 docker build . \
     --build \
-    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
+    --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
     --build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
     --tag "my-pypi-selected-version:0.0.1"
 # [END build]
diff --git a/docs/docker-stack/docker-examples/restricted/restricted_environments.sh b/docs/docker-stack/docker-examples/restricted/restricted_environments.sh
index 31576dd..bceef32 100755
--- a/docs/docker-stack/docker-examples/restricted/restricted_environments.sh
+++ b/docs/docker-stack/docker-examples/restricted/restricted_environments.sh
@@ -34,7 +34,7 @@ pip download --dest docker-context-files \
 # [END download]
 
 # [START build]
-export DEBIAN_VERSION="bullseye"
+export DEBIAN_VERSION="buster"
 
 docker build . \
     --pull \
diff --git a/scripts/ci/libraries/_initialization.sh b/scripts/ci/libraries/_initialization.sh
index a59641d..7a2f25e 100644
--- a/scripts/ci/libraries/_initialization.sh
+++ b/scripts/ci/libraries/_initialization.sh
@@ -353,7 +353,7 @@ function initialization::initialize_image_build_variables() {
     # Default build id
     export CI_BUILD_ID="${CI_BUILD_ID:="0"}"
 
-    export DEBIAN_VERSION=${DEBIAN_VERSION:="bullseye"}
+    export DEBIAN_VERSION=${DEBIAN_VERSION:="buster"}
 
     # Default extras used for building Production image. The canonical source of this information is in the Dockerfile
     DEFAULT_PROD_EXTRAS=$(grep "ARG AIRFLOW_EXTRAS=" "${AIRFLOW_SOURCES}/Dockerfile" |