2021-03-01 17:36:38 -08:00
|
|
|
# Defining environment
|
2023-08-17 00:10:17 -05:00
|
|
|
ARG APP_ENV=full
|
|
|
|
ARG BASE_IMAGE=acryldata/datahub-ingestion-base
|
2023-09-26 00:10:49 -04:00
|
|
|
ARG DOCKER_VERSION=head
|
2021-03-01 17:36:38 -08:00
|
|
|
|
2023-08-17 00:10:17 -05:00
|
|
|
FROM $BASE_IMAGE:$DOCKER_VERSION as base
|
|
|
|
USER 0
|
|
|
|
|
|
|
|
COPY ./metadata-ingestion /datahub-ingestion
|
2023-09-07 20:17:50 -05:00
|
|
|
COPY ./metadata-ingestion-modules/airflow-plugin /datahub-ingestion/airflow-plugin
|
2023-08-17 00:10:17 -05:00
|
|
|
|
2022-01-10 18:38:19 -05:00
|
|
|
ARG RELEASE_VERSION
|
2023-08-17 00:10:17 -05:00
|
|
|
WORKDIR /datahub-ingestion
|
2023-09-12 13:11:01 -07:00
|
|
|
RUN sed -i.bak "s/__version__ = \"1!0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" src/datahub/__init__.py && \
|
|
|
|
sed -i.bak "s/__version__ = \"1!0.0.0.dev0\"/__version__ = \"$RELEASE_VERSION\"/" airflow-plugin/src/datahub_airflow_plugin/__init__.py && \
|
2022-01-10 18:38:19 -05:00
|
|
|
cat src/datahub/__init__.py && \
|
2023-08-17 00:10:17 -05:00
|
|
|
chown -R datahub /datahub-ingestion
|
|
|
|
|
|
|
|
USER datahub
|
|
|
|
ENV PATH="/datahub-ingestion/.local/bin:$PATH"
|
|
|
|
|
|
|
|
FROM base as slim-install
|
|
|
|
RUN pip install --no-cache --user ".[base,datahub-rest,datahub-kafka,snowflake,bigquery,redshift,mysql,postgres,hive,clickhouse,glue,dbt,looker,lookml,tableau,powerbi,superset,datahub-business-glossary]"
|
|
|
|
|
|
|
|
FROM base as full-install
|
2023-09-07 20:17:50 -05:00
|
|
|
RUN pip install --no-cache --user ".[base]" && \
|
|
|
|
pip install --no-cache --user "./airflow-plugin[acryl-datahub-airflow-plugin]" && \
|
|
|
|
pip install --no-cache --user ".[all]"
|
2021-03-01 17:36:38 -08:00
|
|
|
|
|
|
|
FROM base as dev-install
|
|
|
|
# Dummy stage for development. Assumes code is built on your machine and mounted to this image.
|
|
|
|
# See this excellent thread https://github.com/docker/cli/issues/1134
|
|
|
|
|
|
|
|
FROM ${APP_ENV}-install as final
|
|
|
|
|
|
|
|
USER datahub
|
2023-08-22 01:08:08 -04:00
|
|
|
ENV PATH="/datahub-ingestion/.local/bin:$PATH"
|