Skip to content

Commit

Permalink
Update docker (sodadata#1699)
Browse files Browse the repository at this point in the history
Add trino and Dremio packages
  • Loading branch information
vijaykiran authored Nov 25, 2022
1 parent 0f2dd4c commit 38e9083
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
37 changes: 18 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,49 @@ ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV ACCEPT_EULA=Y
RUN apt-get update && apt-get install -y curl gnupg2
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

# install dependencies
RUN apt-get update && \
apt-get upgrade -y && \
apt-get remove -y python3.10 && \
apt-get install -y --no-install-recommends software-properties-common gnupg2 && \
add-apt-repository -y ppa:deadsnakes/ppa && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
build-essential \
procps \
build-essential curl \
libpq-dev \
libsasl2-dev \
libssl-dev libffi-dev \
python3.9 python3.9-dev python3.9-venv libpython3.9-dev libpython3.9 \
python3.9-distutils \
odbcinst \
msodbcsql18 \
unixodbc-dev git && \
apt-get clean -qq -y && \
unixodbc-dev git lsb-release \
alien odbcinst

#sqlserver support - see https://techcommunity.microsoft.com/t5/sql-server/odbc-drivers-for-ubuntu-22-04/m-p/3469347/highlight/true#M1668
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/21.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y libsasl2-dev odbcinst mssql-tools18 msodbcsql18 unixodbc-dev

# Dremio support
RUN curl -L https://download.dremio.com/arrow-flight-sql-odbc-driver/arrow-flight-sql-odbc-driver-LATEST.x86_64.rpm -o arrow-driver.rpm && \
alien -iv --scripts arrow-driver.rpm

RUN apt-get clean -qq -y && \
apt-get autoclean -qq -y && \
apt-get autoremove -qq -y && \
rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/python3.9 /usr/bin/python && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.9 get-pip.py

# extra dependencies for soda-scientific
RUN pip --no-cache-dir install "numpy>=1.15.4" \
"Cython>=0.22"
RUN mkdir /app

WORKDIR /app

RUN pip install --upgrade pip

COPY . .

RUN pip --no-cache-dir install "$(cat dev-requirements.in | grep pip-tools)" && \
pip --no-cache-dir install -r dev-requirements.txt

RUN pip --no-cache-dir install -r requirements.txt

RUN apt-get purge -y build-essential git curl && \
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
./soda/sqlserver
./soda/mysql
./soda/oracle

./soda/trino
./soda/dremio

0 comments on commit 38e9083

Please sign in to comment.