# IfxPy benchmark container — Ubuntu 20.04 base for libcrypt.so.1 compat. # # Runs side-by-side with the host's `informix-db` benchmarks against the # same Informix dev container at host.docker.internal:9088. Both drivers # hit the same server over loopback equivalent (Docker's host-gateway # DNS), making the comparison apples-to-apples on the wire layer. # # Build: # docker build -f tests/benchmarks/compare/Dockerfile.ifxpy \ # -t ifxpy-bench tests/benchmarks/compare/ # # Run: # docker run --rm --network=host ifxpy-bench FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ python3.9 python3-pip python3.9-dev \ build-essential \ libcrypt1 libcrypt-dev \ curl ca-certificates tar \ && rm -rf /var/lib/apt/lists/* # IfxPy needs setuptools <58 because its setup.py uses use_2to3 RUN python3.9 -m pip install --upgrade "pip<24" "setuptools<58" wheel # Permissive CFLAGS bypass GCC's modern strict-pointer-types check. ENV CFLAGS="-Wno-incompatible-pointer-types -Wno-error" RUN python3.9 -m pip install IfxPy # Pull OneDB ODBC drivers (92MB) — IfxPy's setup.py downloaded headers # but not the runtime libs. RUN mkdir -p /opt/onedb && cd /opt/onedb && \ curl -sSL https://hcl-onedb.github.io/odbc/OneDB-Linux64-ODBC-Driver.tar | tar xf - ENV INFORMIXDIR=/opt/onedb/onedb-odbc-driver ENV LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/cli:$INFORMIXDIR/lib/esql:$INFORMIXDIR/lib/client:$INFORMIXDIR/gls/dll # Sanity check: import + smoke connect. COPY ifxpy_bench.py /opt/ifxpy_bench.py WORKDIR /opt CMD ["python3.9", "/opt/ifxpy_bench.py"]