You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/05/16 12:45:08 UTC

[airflow] 01/02: Add slim image to docs/docker-stack/README.md (#23710)

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

potiuk pushed a commit to branch v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 46521d0a5495287aea4a49c13b527efb39deea82
Author: Kamil BreguĊ‚a <mi...@users.noreply.github.com>
AuthorDate: Sun May 15 11:52:51 2022 +0200

    Add slim image to docs/docker-stack/README.md (#23710)
---
 docs/docker-stack/README.md                         | 11 ++++++++++-
 scripts/ci/pre_commit/pre_commit_update_versions.py |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/docs/docker-stack/README.md b/docs/docker-stack/README.md
index 907c64028d..bb5c92c088 100644
--- a/docs/docker-stack/README.md
+++ b/docs/docker-stack/README.md
@@ -38,9 +38,18 @@ You can find the following images there (Assuming Airflow version `2.3.0`):
 * `apache/airflow:2.3.0` - the versioned Airflow image with default Python version (3.7 currently)
 * `apache/airflow:2.3.0-pythonX.Y` - the versioned Airflow image with specific Python version
 
-Those are "reference" images. They contain the most common set of extras, dependencies and providers that are
+Those are "reference" regular images. They contain the most common set of extras, dependencies and providers that are
 often used by the users and they are good to "try-things-out" when you want to just take Airflow for a spin,
 
+You can also use "slim" images that contain only core airflow and are about half the size of the "regular" images
+but you need to add all the [Reference for package extras](https://airflow.apache.org/docs/apache-airflow/stable/extra-packages-ref.html) and providers that you need separately
+via [Building the image](https://airflow.apache.org/docs/docker-stack/build.html#build-build-image).
+
+* `apache/airflow:slim-latest`              - the latest released Airflow image with default Python version (3.7 currently)
+* `apache/airflow:slim-latest-pythonX.Y`    - the latest released Airflow image with specific Python version
+* `apache/airflow:slim-2.3.0`           - the versioned Airflow image with default Python version (3.7 currently)
+* `apache/airflow:slim-2.3.0-pythonX.Y` - the versioned Airflow image with specific Python version
+
 The Apache Airflow image provided as convenience package is optimized for size, and
 it provides just a bare minimal set of the extras and dependencies installed and in most cases
 you want to either extend or customize the image. You can see all possible extras in [Reference for package extras](https://airflow.apache.org/docs/apache-airflow/stable/extra-packages-ref.html).
diff --git a/scripts/ci/pre_commit/pre_commit_update_versions.py b/scripts/ci/pre_commit/pre_commit_update_versions.py
index 3898d64a44..6ae981a8d2 100755
--- a/scripts/ci/pre_commit/pre_commit_update_versions.py
+++ b/scripts/ci/pre_commit/pre_commit_update_versions.py
@@ -47,7 +47,7 @@ def update_version(pattern: re.Pattern, v: str, file_path: str):
 REPLACEMENTS = {
     r'^(FROM apache\/airflow:).*($)': "docs/docker-stack/docker-examples/extending/*/Dockerfile",
     r'(apache\/airflow:)[^-]*(\-)': "docs/docker-stack/entrypoint.rst",
-    r'(`apache/airflow:)[0-9].*?((?:-pythonX.Y)?`)': "docs/docker-stack/README.md",
+    r'(`apache/airflow:(?:slim-)?)[0-9].*?((?:-pythonX.Y)?`)': "docs/docker-stack/README.md",
     r'(\(Assuming Airflow version `).*(`\))': "docs/docker-stack/README.md",
 }