Skip to content

Commit 297a98c

Browse files
committed
fix base image
1 parent 0229421 commit 297a98c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

airbyte_cdk/utils/docker.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import logging
66
import subprocess
77
import sys
8-
from email.policy import default
98
from pathlib import Path
109

1110
import click
@@ -29,7 +28,8 @@
2928
{extra_build_steps}
3029
3130
# RUN pip install --no-cache-dir uv
32-
RUN pip install --no-cache-dir .
31+
32+
RUN python -m pip install --no-cache-dir .
3333
3434
FROM {base_image}
3535
@@ -128,13 +128,17 @@ def build_connector_image(
128128
)
129129

130130
dockerfile_path.parent.mkdir(parents=True, exist_ok=True)
131-
image_name = f"airbyte/{connector_name}"
132-
if metadata.data.connectorBuildOptions:
133-
image_name = f"airbyte/{connector_name}"
131+
if not metadata.data.connectorBuildOptions:
132+
raise ValueError(
133+
"Connector build options are not defined in metadata.yaml. "
134+
"Please check the connector's metadata file."
135+
)
136+
137+
base_image = metadata.data.connectorBuildOptions.baseImage
134138

135139
dockerfile_path.write_text(
136140
DOCKERFILE_TEMPLATE.format(
137-
base_image=image_name,
141+
base_image=base_image,
138142
connector_snake_name=connector_snake_name,
139143
connector_kebab_name=connector_kebab_name,
140144
extra_build_steps=extra_build_steps,

0 commit comments

Comments
 (0)