diff --git a/ingestion/Dockerfile b/ingestion/Dockerfile index c843a219e19..cc0df5ad259 100644 --- a/ingestion/Dockerfile +++ b/ingestion/Dockerfile @@ -42,7 +42,7 @@ RUN apt-get -qq update \ && rm -rf /var/lib/apt/lists/* COPY --from=mysql /usr/bin/mysqldump /usr/bin/mysqldump -RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \ +RUN if [ $(uname -m) = "arm64" || $(uname -m) = "aarch64" ]; \ then \ wget -q https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-basic-linux.arm64-19.10.0.0.0dbru.zip -O /oracle-instantclient.zip && \ unzip -qq -d /instantclient -j /oracle-instantclient.zip && rm -f /oracle-instantclient.zip; \ @@ -54,7 +54,7 @@ RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \ ENV LD_LIBRARY_PATH=/instantclient # Install DB2 iAccess Driver -RUN if [[ $(uname -m) == "x86_64" ]]; \ +RUN if [ $(uname -m) = "x86_64" ]; \ then \ curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \ && apt update \ @@ -82,10 +82,9 @@ RUN pip install "openmetadata-managed-apis~=${RI_VERSION}" --constraint "https:/ RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}" # Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593 -RUN if [[ $(uname -m) == "x86_64" ]]; \ - then \ - pip install "openmetadata-ingestion[db2]~=${RI_VERSION}"; \ - fi +RUN [ $(uname -m) = "x86_64" ] \ + && pip install "openmetadata-ingestion[db2]~=${RI_VERSION}" \ + || echo "DB2 not supported on ARM architectures." # bump python-daemon for https://github.com/apache/airflow/pull/29916 RUN pip install "python-daemon>=3.0.0" diff --git a/ingestion/Dockerfile.ci b/ingestion/Dockerfile.ci index 00c62f12eef..f8433f776ca 100644 --- a/ingestion/Dockerfile.ci +++ b/ingestion/Dockerfile.ci @@ -43,7 +43,7 @@ RUN dpkg --configure -a \ && rm -rf /var/lib/apt/lists/* COPY --from=mysql /usr/bin/mysqldump /usr/bin/mysqldump -RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \ +RUN if [ $(uname -m) = "arm64" || $(uname -m) = "aarch64" ]; \ then \ wget https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-basic-linux.arm64-19.10.0.0.0dbru.zip -O /oracle-instantclient.zip && \ unzip -d /instantclient -j /oracle-instantclient.zip && rm -f /oracle-instantclient.zip; \ @@ -55,7 +55,7 @@ RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \ ENV LD_LIBRARY_PATH=/instantclient # Install DB2 iAccess Driver -RUN if [[ $(uname -m) == "x86_64" ]]; \ +RUN if [ $(uname -m) = "x86_64" ]; \ then \ curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \ && apt update \ @@ -93,10 +93,9 @@ ARG INGESTION_DEPENDENCY="all" RUN pip install ".[${INGESTION_DEPENDENCY}]" # Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593 -RUN if [[ $(uname -m) == "x86_64" ]]; \ - then \ - pip install ".[db2]"; \ - fi +RUN [ $(uname -m) = "x86_64" ] \ + && pip install ".[db2]" \ + || echo "DB2 not supported on ARM architectures." # bump python-daemon for https://github.com/apache/airflow/pull/29916 RUN pip install "python-daemon>=3.0.0" diff --git a/ingestion/operators/docker/Dockerfile b/ingestion/operators/docker/Dockerfile index f145fb82d4e..33178a439c9 100644 --- a/ingestion/operators/docker/Dockerfile +++ b/ingestion/operators/docker/Dockerfile @@ -48,7 +48,7 @@ RUN echo "deb https://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" > /etc apt-get -qq autoremove -yqq --purge; \ apt-get -qq clean && rm -rf /var/lib/apt/lists/* -RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \ +RUN if [ $(uname -m) = "arm64" || $(uname -m) = "aarch64" ]; \ then \ wget -q https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-basic-linux.arm64-19.10.0.0.0dbru.zip -O /oracle-instantclient.zip && \ unzip -qq -d /instantclient -j /oracle-instantclient.zip && rm -f /oracle-instantclient.zip; \ @@ -60,7 +60,7 @@ RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \ ENV LD_LIBRARY_PATH=/instantclient # Install DB2 iAccess driver -RUN if [[ $(uname -m) == "x86_64" ]]; \ +RUN if [ $(uname -m) = "x86_64" ]; \ then \ curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \ && apt update \ @@ -88,10 +88,9 @@ RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}" # Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593 -RUN if [[ $(uname -m) == "x86_64" ]]; \ - then \ - pip install "openmetadata-ingestion[db2]~=${RI_VERSION}"; \ - fi +RUN [ $(uname -m) = "x86_64" ] \ + && pip install "openmetadata-ingestion[db2]~=${RI_VERSION}" \ + || echo "DB2 not supported on ARM architectures." # Uninstalling psycopg2-binary and installing psycopg2 instead # because the psycopg2-binary generates a architecture specific error diff --git a/ingestion/operators/docker/Dockerfile.ci b/ingestion/operators/docker/Dockerfile.ci index 00d2d0c6329..4363c169800 100644 --- a/ingestion/operators/docker/Dockerfile.ci +++ b/ingestion/operators/docker/Dockerfile.ci @@ -48,7 +48,7 @@ RUN echo "deb https://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" > /etc apt-get -qq autoremove -yqq --purge; \ apt-get -qq clean && rm -rf /var/lib/apt/lists/* -RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \ +RUN if [ $(uname -m) = "arm64" || $(uname -m) = "aarch64" ]; \ then \ wget -q https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-basic-linux.arm64-19.10.0.0.0dbru.zip -O /oracle-instantclient.zip && \ unzip -qq -d /instantclient -j /oracle-instantclient.zip && rm -f /oracle-instantclient.zip; \ @@ -60,7 +60,7 @@ RUN if [[ $(uname -m) == "arm64" || $(uname -m) == "aarch64" ]]; \ ENV LD_LIBRARY_PATH=/instantclient # Install DB2 iAccess Driver -RUN if [[ $(uname -m) == "x86_64" ]]; \ +RUN if [ $(uname -m) = "x86_64" ]; \ then \ curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \ && apt update \ @@ -85,10 +85,9 @@ RUN pip install ".[airflow]" RUN pip install ".[${INGESTION_DEPENDENCY}]" # Temporary workaround for https://github.com/open-metadata/OpenMetadata/issues/9593 -RUN if [[ $(uname -m) == "x86_64" ]]; \ - then \ - pip install ".[db2]"; \ - fi +RUN [ $(uname -m) = "x86_64" ] \ + && pip install ".[db2]" \ + || echo "DB2 not supported on ARM architectures." # Required for Airflow DockerOperator, as we need to run the workflows from a `python main.py` command in the container. COPY ingestion/operators/docker/*.py .