Note:

To see a list of all Docker images for ColdFusion, API Manager, and Performance Monitoring Toolset, see ColdFusion Bintray.

Tag Conventions

  • latest - Latest available version of ColdFusion
  • latest-2018 - Latest available version of ColdFusion 2018
  • 2016.0.6 - ColdFusion (2016 release) Update 6

ColdFusion EULA

Before proceeding, it is mandatory that you read the EULA.

EULA needs to be accepted, via an environment variable, while running the container.

Frequently Asked Questions

Pull the image

To pull a Docker image, the command syntax is:

docker pull eaps-docker-coldfusion.bintray.io/cf/<product>:<version>

For example, to pull the latest ColdFusion image, enter the following command:

  • Standalone - docker pull eaps-docker-coldfusion.bintray.io/cf/standalone:latest
  • Add-ons - docker pull eaps-docker-coldfusion.bintray.io/cf/addons:latest
  • Performance Monitoring Toolset - docker pull eaps-docker-coldfusion.bintray.io/cf/pmt:latest

Run ColdFusion

Run ColdFusion image

// Lists supported commands and environment variables
docker run --rm -it eaps-docker-coldfusion.bintray.io/cf/coldfusion:latest help

// Returns the version no of the installed ColdFusion
docker run --rm -it eaps-docker-coldfusion.bintray.io/cf/coldfusion:latest info

// Runs a CFM page in C:/wwwroot/ via CLI
docker run --rm -it -e acceptEULA=YES -v C:/wwwroot/:/app eaps-docker-coldfusion.bintray.io/cf/coldfusion:latest cli test.cfm

Run ColdFusion image in daemon mode

docker run -dt -p 8500:8500 -v c:/wwwroot/:/app -e acceptEULA=YES -e password=ColdFusion123 -e enableSecureProfile=true eaps-docker-coldfusion.bintray.io/cf/coldfusion:latest

To view a lost of all running containers, enter:

docker ps -a

To check the status of the container, enter:

docker logs <containerID / containerName>

Access CFM pages at http://localhost:8500

The webroot is reconfigured to point to the directory, /app. A volume needs to be moved to /app.

On Windows, ensure that shared drives are enabled, and credentials are updated.

Import configurations

The CAR archives mounted to the /data directory are automatically imported during startup.

Environment variables

For a list of environment variables for this image, enter:

docker run --rm -it eaps-docker-coldfusion.bintray.io/cf/coldfusion:latest help

Env file

acceptEULA=YES
password=<pw>
enableSecureProfile=<true/false(default)>
configureExternalSessions=<true/false(default)>
externalSessionsHost=<Redis Host (Default:localhost)>
externalSessionsPort=<Redis Port (Default:6379)>
externalSessionsPassword=<Redis Password (Default:Empty)>
configureExternalAddons=<true/false(default)>
addonsHost=<Addon Container Host (Default: localhost)>
addonsPort=<Addon Container Port (Default: 8989)>
addonsUsername=<Solr username (Default: admin)>
addonsPassword=<Solr password (Default: admin)>
addonsPDFServiceName=<PDF Service Name (Default: addonsContainer)>
addonsPDFSSL=<true/false(default)>
setupScript=<CFM page to be invoked on startup. Must be present in the webroot, /app>

Pass the serial key as environment variable

coldfusion.env

acceptEULA=YES
serial=
previousSerial=na
password=password

Extend ColdFusion base image

In this scenario, we shall extend the ColdFusion base image to register a MySQL driver, so that we can create a MySQL datasource using ColdFusion’s Admin API.

Dockerfile

FROM eaps-docker-coldfusion.bintray.io/cf/coldfusion:latest
COPY mysql-connector-java-commercial-5.1.25-bin.jar /opt/coldfusion/cfusion/lib

The file, mysql-connector-java-commercial-5.1.25-bin.jar, must be present in the current working directory.

In the webroot, create a cfm that uses ColdFusion’s Admin API to create a datasource. Let’s call the CFM page, setupColdFusion.cfm. Place the file in the mounted webroot volume.

<cfscript>
    // Login is always required. This example uses two lines of code.
    adminObj = createObject("component","CFIDE.adminapi.administrator");
    adminObj.login("ColdFusion123"); //CF Admin password
    // Create a MySQL datasource
    datasource = createObject("component", "CFIDE.adminapi.datasource");
    datasource.setMySQL5("SampleMYSqlDB", "database-host", "testDB");
</cfscript>

To build and bring up a container based on this image, run Docker compose. A Docker compose file is a tool for defining and running applications in a Docker container.

Create a docker-compose.yml file with the following content outside the directory that contains the above DockerFile and setupColdFusion.cfm. The directory that contains the above files must be named ‘app’.

Docker-compose.yml

version: "3" 
services:
    coldfusion: 
        container_name: myapp
        build:
          context: ./app
          dockerfile: Dockerfile
        image: app
        depends_on:
        - redis
        - addons
        ports:
        - "8500:8500"
        volumes:
        - "/opt/wwwroot:/app"
        env_file:
        - coldfusion.env
        healthcheck:
           test: curl -f http://addons:8989/solr/ || exit 1  
           interval: 1m
           timeout: 3s
        deploy:
           mode: replicated
           replicas: 2
           restart_policy:
              condition: on-failure
           update_config:
              parallelism: 1
              delay: 10s
        networks: 
        - webnet

    addons:
        container_name: mycfaddons
        image: eaps-docker-coldfusion.bintray.io/cf/addons
        environment:
        - acceptEULA=YES
        ports: 
        - "8989:8989"
        networks:
        - webnet

    redis:
        container_name: myredis
        image: redis:latest
        ports:
        - "6381:6379"
        volumes:
        - "redis_data:/data"
        networks:
        - webnet

volumes:
    redis_data:

networks:
    webnet: 

coldfusion.env

acceptEULA=YES
password=ColdFusion123

To run Docker compose, enter the following command:

docker-compose up -d

The ColdFusionpage, setupColdFusion.cfm is executed on container starts up, since the environment variable, ‘setupScript’ is configured appropriately.

You can access the administrator to ensure that the MySQL datasource is configured correctly.

ColdFusion Add-ons

Pull the image

To pull a Docker image, the command syntax is:

docker pull eaps-docker-coldfusion.bintray.io/cf/<product>:<version>

For example,

docker pull eaps-docker-coldfusion.bintray.io/cf/addons:latest

Environment variables

coldfusion.env

acceptEULA=YES
password=ColdFusion123
setupScript=setupColdFusion.cfm
enableSecureProfile=true
configureExternalSessions=true
externalSessionsHost=redis
externalSessionsPort=6379
configureExternalAddons=true
addonsHost=addons
addonsPort=8989
addonsUsername=admin
addonsPassword=admin
addonsPDFServiceName=addonsContainer
addonsPDFSSL=false

Performance Monitoring Toolset

Note:

Run the following commands before you start a Performance Monitoring Toolset container:

  • The maximum count of open files must be more than 65536. Use the command, ulimit -n 65536.
  • The maximum count of maps must be more than 262144. To increase the limit, use the command, sysctl -w vm.max_map_count=262144.”

The Docker image for Performance Monitoring Toolset is only available for the 2018 release of ColdFusion.

Pull the image

To pull a Docker image, the command syntax is:

docker pull eaps-docker-coldfusion.bintray.io/cf/<product>:<version>

For example,

docker pull eaps-docker-coldfusion.bintray.io/cf/pmt:latest

Environment variables

pmt.env

acceptEULA=YES
datastoreHost=pmt
datastorePort=9200
startDatastore=true

coldfusion.env

acceptEULA=YES
password=ColdFusion123

docker-compose.yml

version: "3" 
services:
    
    coldfusion:
        container_name: coldfusion
        image: eaps-docker-coldfusion.bintray.io/cf/coldfusion:2018.0.1 
        ports:
        - "8500:8500"
        volumes:
        - "./webroot:/app"
        env_file:
        - coldfusion.env
        healthcheck:
           test: curl -f http://localhost:8500/ 
           interval: 1m
           timeout: 3s
        networks:
        - webnet

    pmt: 
        container_name: pmt
        image: docker pull eaps-docker-coldfusion.bintray.io/cf/pmt:2018.0.0
        depends_on:
        - coldfusion
        ports:
        - "9101:9101"
        env_file:
        - pmt.env
        healthcheck:
           test: curl -f http://localhost:9101/  
           interval: 1m
           timeout: 3s
        networks: 
        - webnet

networks:
    webnet: 

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy