Skip to content

Commit

Permalink
chore: add FreeTDS driver
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed Feb 12, 2024
1 parent 9c244c7 commit 39b8027
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docker/Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1

RUN useradd --user-group --system --create-home --no-log-init keep

# This is for MSSQL DB connections
RUN apt-get update && apt-get install -y tdsodbc unixodbc-dev \
&& apt install unixodbc -y \
&& apt-get clean -y

RUN echo "[FreeTDS]\n\
Description = FreeTDS unixODBC Driver\n\
Driver = /usr/lib/arm-linux-gnueabi/odbc/libtdsodbc.so\n\
Setup = /usr/lib/arm-linux-gnueabi/odbc/libtdsS.so" >> /etc/odbcinst.ini

WORKDIR /app

FROM base as builder
Expand All @@ -26,6 +37,7 @@ FROM base as final
ENV PATH="/venv/bin:${PATH}"
ENV VIRTUAL_ENV="/venv"
COPY --from=builder /venv /venv

# as per Openshift guidelines, https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images
RUN chgrp -R 0 /app && chmod -R g=u /app
RUN chown -R keep:keep /app
Expand Down

0 comments on commit 39b8027

Please sign in to comment.