Question
· Jun 30

Help with setting up SQL ODBC database connection in IRIS container

I'm running the image "containers.intersystems.com/intersystems/irishealth-community:2025.1" as a container on my local Docker desktop.

Now I want to set up an ODBC SQL connection, but I don't know how to do it.

I have tried various ways without success. Like building my own image (see "Dockerfile" description below).

I have also added ODBCINI variable in my docker-compse (see "Docker-compose.yml" description below).

Anyone done this before?

I'd really appreciate some help.

Thanks.

 

Dockerfile
FROM containers.intersystems.com/intersystems/irishealth-community:2025.1
USER root
RUN apt-get update && \
    apt-get install -y unixodbc odbc-postgresql && \
    apt-get clean && rm -rf /var/lib/apt/lists/*
COPY odbc.ini /etc/odbc.ini
COPY odbcinst.ini /etc/odbcinst.ini
USER irisowner

Docker-compose.yml
services:
  iris:
    build: .
    container_name: iris
    ports:
      - "52773:52773"
      - "1972:1972"
    environment:
      - ODBCINI=/etc/odbc.ini
    volumes:
      - ./iris-init:/irisdev/app
      - iris_data:/ISC/durable
      - /c/temp/IRIS-mnt/mgr:/opt/hc/mgr        # For storing namespace data
    networks:
      - irisnet     # Setting this to be in the same docker network as the postgres database I want to connect to.

volumes:
  iris_data:

networks:
  irisnet:
    external: true

Product version: IRIS 2025.1
Discussion (1)2
Log in or sign up to continue