datahub/docker/datahub-ingestion/Dockerfile-slim-only
skrydal 67b67f77b7
feat(ingestion): Add -e flag to uv command in ingestion Dockerfiles (#10114)
Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
2024-04-09 18:42:44 -07:00

29 lines
1016 B
Plaintext

# Defining environment
ARG BASE_IMAGE=acryldata/datahub-ingestion-base
ARG DOCKER_VERSION=head-slim
ARG PIP_MIRROR_URL=https://pypi.python.org/simple
FROM $BASE_IMAGE:$DOCKER_VERSION as base
USER datahub
# Optionally set corporate mirror for apk and pip
ARG PIP_MIRROR_URL
RUN if [ "${PIP_MIRROR_URL}" != "https://pypi.python.org/simple" ] ; then pip config set global.index-url ${PIP_MIRROR_URL} ; fi
ENV UV_INDEX_URL=${PIP_MIRROR_URL}
COPY --chown=datahub ./metadata-ingestion /datahub-ingestion
ARG RELEASE_VERSION
WORKDIR /datahub-ingestion
RUN sed -i.bak "s/__version__ = \"1\!0.0.0.dev0\"/__version__ = \"$(echo $RELEASE_VERSION|sed s/-/+/)\"/" src/datahub/__init__.py && \
cat src/datahub/__init__.py
FROM base as slim-install
RUN uv pip install --no-cache -e ".[base,datahub-rest,datahub-kafka,snowflake,bigquery,redshift,mysql,postgres,hive,clickhouse,glue,dbt,looker,lookml,tableau,powerbi,superset,datahub-business-glossary]" && \
datahub --version
FROM slim-install as final
USER datahub