Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
option_pull_image,
option_push_image,
option_python,
option_python_image,
option_python_versions,
option_run_in_parallel,
option_runtime_apt_command,
Expand Down Expand Up @@ -127,6 +128,7 @@
"--install-providers-from-sources",
"--airflow-constraints-mode",
"--airflow-constraints-reference",
"--python-image",
"--additional-python-deps",
"--runtime-apt-deps",
"--runtime-apt-command",
Expand Down Expand Up @@ -253,6 +255,7 @@ def run_build_in_parallel(
@option_dev_apt_command
@option_dev_apt_deps
@option_force_build
@option_python_image
@option_runtime_apt_command
@option_runtime_apt_deps
@option_airflow_constraints_mode_ci
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
option_pull_image,
option_push_image,
option_python,
option_python_image,
option_python_versions,
option_run_in_parallel,
option_runtime_apt_command,
Expand Down Expand Up @@ -118,6 +119,7 @@
"--airflow-extras",
"--airflow-constraints-mode",
"--airflow-constraints-reference",
"--python-image",
"--additional-python-deps",
"--additional-extras",
"--additional-runtime-apt-deps",
Expand Down Expand Up @@ -301,6 +303,7 @@ def run_build_in_parallel(
@option_additional_runtime_apt_command
@option_dev_apt_command
@option_dev_apt_deps
@option_python_image
@option_runtime_apt_command
@option_runtime_apt_deps
@option_tag_as_latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class CommonBuildParams:
install_providers_from_sources: bool = False
platform: str = DOCKER_DEFAULT_PLATFORM
prepare_buildx_cache: bool = False
python_image: Optional[str] = None
push_image: bool = False
python: str = "3.7"
runtime_apt_command: str = ""
Expand Down Expand Up @@ -111,7 +112,8 @@ def docker_cache_directive(self) -> List[str]:
@property
def python_base_image(self):
"""Construct Python Base Image"""
# ghcr.io/apache/airflow/main/python:3.8-slim-bullseye
if self.python_image is not None:
return self.python_image
return f'python:{self.python}-slim-{self.debian_version}'

@property
Expand Down
7 changes: 7 additions & 0 deletions dev/breeze/src/airflow_breeze/utils/common_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,10 @@
is_flag=True,
envvar='PULL_IMAGE',
)

option_python_image = click.option(
'--python-image',
help="If specified this is the base python image used to build the image. "
"Should be something like: python:VERSION-slim-bullseye",
envvar='PYTHON_IMAGE',
)
288 changes: 150 additions & 138 deletions images/breeze/output-build-image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading