Skip to content

Commit

Permalink
Bugfix- Added support for ODBC version 17 using argument (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilantnt committed Nov 10, 2023
1 parent 8d5a16c commit 1744cea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ RUN mv instantclient*/* /opt/oracle/instantclient


FROM python:3.10-slim-bullseye
ARG ODBC_DRIVER_VERSION=18
ENV ODBC_DRIVER=msodbcsql${ODBC_DRIVER_VERSION}

RUN apt-get update && \
apt-get full-upgrade -y && \
Expand All @@ -49,7 +51,7 @@ RUN apt-get update && \
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
(. /etc/os-release; echo "deb https://packages.microsoft.com/debian/$VERSION_ID/prod $VERSION_CODENAME main") > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql18 && \
ACCEPT_EULA=Y apt-get install -y --no-install-recommends $ODBC_DRIVER && \
rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man && \
apt-get clean

Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ where ``$CONFIG_FILE`` is the absolute path of the configuration file to
use. Note that the image expects the file to be available as ``/config.yaml``
in the container.

For other ODBC versions, build the image with --build-arg VERSION_NUMBER:
docker build --build-arg ODBC_DRIVER_VERSION=17

The image has support for connecting the following databases:

- PostgreSQL (``postgresql://``)
Expand Down

0 comments on commit 1744cea

Please sign in to comment.