datahub/docker/datahub-ingestion/Dockerfile-slim-only
Harshal Sheth c4bc34f9ff
feat(build): remove base-requirements.txt (#11238)
Co-authored-by: David Leifker <david.leifker@acryl.io>
2024-08-29 22:34:00 -05:00

32 lines
1.1 KiB
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 /metadata-ingestion
ARG RELEASE_VERSION
WORKDIR /metadata-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 --mount=type=cache,target=/datahub-ingestion/.cache/uv,uid=1000,gid=1000 \
UV_LINK_MODE=copy uv pip install -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
WORKDIR /datahub-ingestion
USER datahub