fix(docker-images): python container install should respect poetry lock file (#62074)
This commit is contained in:
committed by
GitHub
parent
e137a10160
commit
3a84faa687
@@ -25,11 +25,12 @@ RUN if [ -n "${EXTRA_PREREQS_SCRIPT}" ]; then \
|
|||||||
./extra_prereqs_script; \
|
./extra_prereqs_script; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: Pre-install uv on the base image to speed up the build.
|
# Until PEP 751 is adopted, we have to install with Poetry in order
|
||||||
# (uv is still faster even with the extra step.)
|
# to respect the `poetry.lock` file.
|
||||||
RUN pip install --no-cache-dir uv
|
RUN poetry config virtualenvs.create false && \
|
||||||
RUN python -m uv pip install --no-cache-dir .
|
poetry install --no-interaction --no-ansi --without=dev
|
||||||
|
|
||||||
|
# Now build the final stage
|
||||||
FROM ${BASE_IMAGE}
|
FROM ${BASE_IMAGE}
|
||||||
ARG CONNECTOR_NAME
|
ARG CONNECTOR_NAME
|
||||||
ARG BASE_IMAGE
|
ARG BASE_IMAGE
|
||||||
@@ -37,6 +38,7 @@ ARG BASE_IMAGE
|
|||||||
WORKDIR /airbyte/integration_code
|
WORKDIR /airbyte/integration_code
|
||||||
|
|
||||||
COPY --from=builder /usr/local /usr/local
|
COPY --from=builder /usr/local /usr/local
|
||||||
|
COPY --from=builder /airbyte/integration_code /airbyte/integration_code
|
||||||
COPY --chmod=755 <<EOT /entrypoint.sh
|
COPY --chmod=755 <<EOT /entrypoint.sh
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
Reference in New Issue
Block a user