Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty image preparation #23304

Merged
merged 1 commit into from
Apr 27, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.

import multiprocessing as mp
import os
import sys
from typing import List, Tuple

Expand Down Expand Up @@ -155,6 +156,8 @@ def build_ci_image(
production_image=False,
)
if ci_image_params.empty_image:
env = os.environ.copy()
env['DOCKER_BUILDKIT'] = "1"
console.print(f"\n[blue]Building empty CI Image for Python {ci_image_params.python}\n")
cmd = construct_empty_docker_build_command(image_params=ci_image_params)
build_result = run_command(
Expand All @@ -164,6 +167,7 @@ def build_ci_image(
dry_run=dry_run,
cwd=AIRFLOW_SOURCES_ROOT,
text=True,
env=env,
)
else:
console.print(f"\n[blue]Building CI Image for Python {ci_image_params.python}\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.
"""Command to build PROD image."""
import contextlib
import os
import sys
from typing import Tuple

Expand Down Expand Up @@ -169,6 +170,8 @@ def build_production_image(
)
console.print(f"\n[blue]Building PROD Image for Python {prod_image_params.python}\n")
if prod_image_params.empty_image:
env = os.environ.copy()
env['DOCKER_BUILDKIT'] = "1"
console.print(f"\n[blue]Building empty PROD Image for Python {prod_image_params.python}\n")
cmd = construct_empty_docker_build_command(image_params=prod_image_params)
build_command_result = run_command(
Expand All @@ -179,6 +182,7 @@ def build_production_image(
cwd=AIRFLOW_SOURCES_ROOT,
check=False,
text=True,
env=env,
)
else:
cmd = construct_docker_build_command(
Expand Down