Skip to content

Commit c4ab74e

Browse files
edg956claude
andcommitted
fix(ci): use direct download for IBM iAccess ODBC driver
The IBM apt repository method was causing CI build failures with "Unable to locate package ibm-iaccess" despite apt update succeeding. The original approach had multiple issues: missing -y flag for non-interactive mode, using apt instead of apt-get in scripts, and unreliable repository package resolution. Switch to downloading the .deb package directly from IBM's server and use dpkg --force-depends to bypass dependency name mismatches. The package declares old Debian package names (libodbc1, odbcinst1debian2) that don't exist in Debian 12, but the actual dependencies (unixodbc, odbcinst) are already installed earlier in the Dockerfile. This is more reliable because: - Eliminates repository caching and resolution issues - Provides predictable versioning (1.1.0.13) - Reduces build steps and potential failure points - Uses dpkg --force-depends safely since the actual libraries are present under different package names - apt-get install -f ensures any actual missing dependencies are resolved 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b1879a4 commit c4ab74e

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

ingestion/operators/docker/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,16 @@ RUN if [ $(uname -m) = "arm64" || $(uname -m) = "aarch64" ]; \
6363
ENV LD_LIBRARY_PATH=/instantclient
6464

6565
# Install DB2 iAccess driver
66-
RUN if [ $(uname -m) = "x86_64" ]; \
67-
then \
68-
curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \
69-
&& apt update \
70-
&& apt install ibm-iaccess; \
71-
fi
66+
# The IBM repository approach is unreliable in CI environments, so we download the package directly
67+
# Use dpkg --force-depends because the package declares old Debian package names (libodbc1, odbcinst1debian2)
68+
# that don't exist in Debian 12, but the actual dependencies (unixodbc, odbcinst) are already installed
69+
RUN if [ $(uname -m) = "x86_64" ]; then \
70+
wget -q https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/main/binary-amd64/ibm-iaccess-1.1.0.13-1.0.amd64.deb \
71+
-O /tmp/ibm-iaccess.deb && \
72+
dpkg -i --force-depends /tmp/ibm-iaccess.deb && \
73+
apt-get install -f -y --no-install-recommends && \
74+
rm -f /tmp/ibm-iaccess.deb; \
75+
fi
7276

7377
WORKDIR ingestion/
7478

ingestion/operators/docker/Dockerfile.ci

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,16 @@ RUN if [ $(uname -m) = "arm64" ] | [ $(uname -m) = "aarch64" ]; \
6363
ENV LD_LIBRARY_PATH=/instantclient
6464

6565
# Install DB2 iAccess Driver
66-
RUN if [ $(uname -m) = "x86_64" ]; \
67-
then \
68-
curl https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/ibmi-acs-1.1.0.list | tee /etc/apt/sources.list.d/ibmi-acs-1.1.0.list \
69-
&& apt update \
70-
&& apt install ibm-iaccess; \
71-
fi
66+
# The IBM repository approach is unreliable in CI environments, so we download the package directly
67+
# Use dpkg --force-depends because the package declares old Debian package names (libodbc1, odbcinst1debian2)
68+
# that don't exist in Debian 12, but the actual dependencies (unixodbc, odbcinst) are already installed
69+
RUN if [ $(uname -m) = "x86_64" ]; then \
70+
wget -q https://public.dhe.ibm.com/software/ibmi/products/odbc/debs/dists/1.1.0/main/binary-amd64/ibm-iaccess-1.1.0.13-1.0.amd64.deb \
71+
-O /tmp/ibm-iaccess.deb && \
72+
dpkg -i --force-depends /tmp/ibm-iaccess.deb && \
73+
apt-get install -f -y --no-install-recommends && \
74+
rm -f /tmp/ibm-iaccess.deb; \
75+
fi
7276

7377
WORKDIR /ingestion
7478

0 commit comments

Comments
 (0)