Skip to content

Commit 726bf37

Browse files
committed
Dockerfile.ci: Install and prepare odbc drivers
1 parent f8da5be commit 726bf37

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

Dockerfile.ci

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,66 @@
11
FROM ubuntu:25.10
22

3+
# -----------------------------------------------------------------------------
34
# Install core tools
4-
RUN apt-get update && \
5-
apt-get install -y \
6-
python3 python3-venv python3-pip python3-dev libpq-dev gcc make bash \
5+
# -----------------------------------------------------------------------------
6+
7+
RUN apt update && \
8+
apt install -y \
9+
curl gnupg python3 python3-venv python3-pip python3-dev libpq-dev gcc make bash \
710
emacs-nox docker-cli git wget unzip && \
811
ln -s /usr/bin/python3 /usr/bin/python && \
912
rm -rf /var/lib/apt/lists/*
1013

14+
# Force IPv4
15+
RUN echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf
16+
17+
# -----------------------------------------------------------------------------
1118
# Install Oracle Instant Client
19+
# -----------------------------------------------------------------------------
20+
1221
RUN wget http://ftp.us.debian.org/debian/pool/main/liba/libaio/libaio1_0.3.113-4_amd64.deb && \
13-
apt-get install -y ./libaio1_0.3.113-4_amd64.deb && \
22+
apt install -y ./libaio1_0.3.113-4_amd64.deb && \
1423
rm libaio1_0.3.113-4_amd64.deb && \
15-
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -O /tmp/instantclient.zip && \
24+
curl https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -o /tmp/instantclient.zip && \
1625
mkdir -p /opt/oracle && \
1726
unzip /tmp/instantclient.zip -d /opt/oracle && \
1827
rm /tmp/instantclient.zip && \
1928
echo "/opt/oracle/$(ls /opt/oracle/ | grep inst)" > /etc/ld.so.conf.d/oracle-instantclient.conf && \
2029
ldconfig
2130

31+
32+
# -----------------------------------------------------------------------------
33+
# Install dependencies for msodbcsql
34+
# -----------------------------------------------------------------------------
35+
36+
37+
# Download Microsoft repo package ( 22.04 because 22.10 stalls )
38+
#RUN curl https://packages.microsoft.com/config/ubuntu/22.10/packages-microsoft-prod.deb -o /tmp/msprod.deb
39+
40+
# Requires manual download of packages-microsoft-prod.deb because Microsoft can't even
41+
# run a working https server
42+
COPY packages-microsoft-prod.deb /tmp/msprod.deb
43+
RUN dpkg -i /tmp/msprod.deb && \
44+
rm /tmp/msprod.deb
45+
46+
# Place gpg keys and fix signed-by entry
47+
#RUN mkdir -p /etc/apt/keyrings && \
48+
# mv /etc/apt/trusted.gpg.d/microsoft-prod.gpg /etc/apt/keyrings/microsoft.gpg && \
49+
# sed -i 's#deb \[arch=amd64#deb [arch=amd64 signed-by=/etc/apt/keyrings/microsoft.gpg]#' /etc/apt/sources.list.d/microsoft-prod.list
50+
51+
# Install ODBC driver
52+
RUN apt update && \
53+
ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev msodbcsql18 mssql-tools18
54+
55+
# -----------------------------------------------------------------------------
56+
# Finalize
57+
# -----------------------------------------------------------------------------
58+
2259
# Set up workdir
2360
WORKDIR /workspace
2461

62+
# -----------------------------------------------------------------------------
2563
# Run
64+
# -----------------------------------------------------------------------------
65+
2666
CMD ["bash"]

0 commit comments

Comments
 (0)