From b922730482c18bf4ca52bfb3c4a764e73814dbdb Mon Sep 17 00:00:00 2001 From: Eric Radman Date: Mon, 28 Oct 2024 20:23:15 -0400 Subject: [PATCH] Docker build: use heredoc for multi-line actions (#7210) --- Dockerfile | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1ba33ed57a..850638edd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,15 @@ RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn --frozen-lockfile --network COPY --chown=redash client /frontend/client COPY --chown=redash webpack.config.js /frontend/ -RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn build; else mkdir -p /frontend/client/dist && touch /frontend/client/dist/multi_org.html && touch /frontend/client/dist/index.html; fi +RUN < /etc/apt/sources.list.d/mssql-release.list \ - && apt-get update \ - && ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql18 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && curl "$databricks_odbc_driver_url" --location --output /tmp/simba_odbc.zip \ - && chmod 600 /tmp/simba_odbc.zip \ - && unzip /tmp/simba_odbc.zip -d /tmp/simba \ - && dpkg -i /tmp/simba/*.deb \ - && printf "[Simba]\nDriver = /opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini \ - && rm /tmp/simba_odbc.zip \ - && rm -rf /tmp/simba; fi +RUN < /etc/apt/sources.list.d/mssql-release.list + apt-get update + ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql18 + apt-get clean + rm -rf /var/lib/apt/lists/* + curl "$databricks_odbc_driver_url" --location --output /tmp/simba_odbc.zip + chmod 600 /tmp/simba_odbc.zip + unzip /tmp/simba_odbc.zip -d /tmp/simba + dpkg -i /tmp/simba/*.deb + printf "[Simba]\nDriver = /opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini + rm /tmp/simba_odbc.zip + rm -rf /tmp/simba + fi +EOF WORKDIR /app