sqldockerdocker-composecoldfusionmssql-jdbc

Coldfusion + Docker: The sqlserver package is not installed


I am trying to get Coldfusion and Docker to work on my Windows machine. I am using the following docker-compose.yml:

version: "3.7"
services:
  sql:
    image: mcr.microsoft.com/mssql/server:2019-latest
    container_name: sql
    hostname: sql
    networks:
      - network
    ports:
      - "1433:1433"
    volumes:
      - "mssqldata:/var/opt/mssql"
      - "./data:/data"
    environment:
      - ACCEPT_EULA=Y
      - SA_PASSWORD=SQLS3rv3r
      - MSSQL_AGENT_ENABLED=true
      - MSSQL_PID=Express
    
  coldfusion:
    image: adobecoldfusion/coldfusion:latest-2021
    container_name: coldfusion
    hostname: coldfusion
    networks:
      - network
    ports:
      - "80:8500"
    volumes:
      - "./app:/app"
      - "./data:/data"
    environment:
      acceptEULA: "YES"
      password: "C0ldFusi0n"
      enableSecureProfile: "false"
    healthcheck:
      test: curl -f http://localhost/
      interval: 1m
      timeout: 3s
    depends_on:
      - sql
volumes:
  mssqldata:
networks:
  network:

but when I go into the administrator to add a datasource I get this error message:

java.sql.SQLException: The sqlserver package is not installed. You can install the package through the CLI package manager (/opt/coldfusion/cfusion/bin/cfpm.sh) by running the command : install sqlserver.

Now if I change the version of Coldfusion to be 2018 I don't get that error message but I need to get it working in a newer version of Coldfusion to test it for a live server. Is there something missing from Coldfusion that was in 2018 but is no longer in 2021 or 2023.


Solution

  • CF2021 is now a minimal install with modules that need installing.

    This can be done within the environment config.

    https://helpx.adobe.com/uk/coldfusion/using/docker-images-coldfusion.html

    You will want to use the installModules option and add a comma delimited list of the modules you want installed.

    environment:
       acceptEULA: "YES"
       password: "C0ldFusi0n"
       enableSecureProfile: "false"
       installModules: sqlserver