Skip to content

Commit 024cf26

Browse files
authored
fix: ensure SDM image maintains airbyte-ci compatibility (#90)
1 parent 0d4bb42 commit 024cf26

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,19 @@ COPY dist/*.whl ./dist/
1010
RUN poetry config virtualenvs.create false \
1111
&& poetry install --only main --no-interaction --no-ansi || true
1212

13-
# Copy source code
14-
COPY airbyte_cdk ./airbyte_cdk
15-
1613
# Build and install the package
1714
RUN pip install dist/*.whl
1815

16+
# Recreate the original structure
17+
RUN mkdir -p source_declarative_manifest \
18+
&& echo 'from source_declarative_manifest.run import run\n\nif __name__ == "__main__":\n run()' > main.py \
19+
&& touch source_declarative_manifest/__init__.py \
20+
&& cp /usr/local/lib/python3.10/site-packages/airbyte_cdk/cli/source_declarative_manifest/_run.py source_declarative_manifest/run.py \
21+
&& cp /usr/local/lib/python3.10/site-packages/airbyte_cdk/cli/source_declarative_manifest/spec.json source_declarative_manifest/
22+
23+
# Remove unnecessary build files
24+
RUN rm -rf dist/ pyproject.toml poetry.lock README.md
25+
1926
# Set the entrypoint
20-
ENV AIRBYTE_ENTRYPOINT="source-declarative-manifest"
21-
ENTRYPOINT ["source-declarative-manifest"]
27+
ENV AIRBYTE_ENTRYPOINT="python /airbyte/integration_code/main.py"
28+
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

0 commit comments

Comments
 (0)