Docker images for ColdFusion

IMPORTANT

On May 1, 2021, all Bintray services will be deprecated, and your accounts will be disabled. For more information, see the official Bintray blog.

This means that the ColdFusion, Performance Monitoring Toolset, and API Manager containers for the versions 2016/2018/2021 will no longer be accessible. This may lead to interruption in your automation scripts and other CI/CD pipelines.

We have hosted the Docker images as tar files in ColdFusion download home. You can load the images in your local environment using the steps below:

  1. Download the tar file.
  2. Run the command, docker load <tar file>

Once the image is available in your local system, you can then run the Docker commands. The name of the image will follow the tag conventions, which were used in Bintray.

For example, if you've downloaded the update tar file of the 2021 release of ColdFusion and loaded the image in your environment,  you can use the following image names with the Docker commands:

  • coldfusion:latest
  • coldusion:latest-2021
  • coldfusion:2021.0.1

If you've downloaded the ColdFusion (2018 release) tar file, use the following image names :

  • coldfusion:latest-2018
  • coldfusion:2018.0.11

Tag Conventions

  • latest - Latest available version of ColdFusion
  • 2021.0.1 - ColdFusion (2021 Release) Update 1
  • 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.

Docker for ColdFusion (2021 release)

You will have a docker image in your system tagged as ColdFusion:2021.0.1

The docker image accepts four new environment variables:

  • installModules: A comma delimited list of modules to be installed by ColdFusion Package Manager,accepts 'all' for installing all the available packages.
  • importCFSettings: A JSON file containing the ColdFusion Settings to be imported . Must be present in the webroot, /app.
  • importCFSettingsPassphrase: Passphrase to import ColdFusion settings from an encrypted JSON file.
  • importModules: A text file containing packages to be imported. Must be present in the webroot, /app. CFPM has an option to export packages installed in a ColdFusion instance . The exported packages are listed in a text file and that text file can be used to import packages in any instance. This is supported using the environment variable importModules.

Frequently Asked Questions

Load the image

To load a ColdFusion tar file, the command syntax is:

docker load <<name of the tar file>

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

  • ColdFusion- docker load < ColdFusion_2021_Docker_WWEJ.tar.gz
  • Add-ons - docker load < add-on tar file
  • Performance Monitoring Toolset - docker load < pmt tar file

For more information, see Docker load command reference.

Create the container

Run the command below to create a container that imports the ColdFusion settings from config.json and installs, as example, the modules scheduler and cfmongodb:

docker container run -dt -p 8500:8500 -v /opt/mywebroot:/app -e acceptEULA=YES -e password=ColdFusion123 -e importCFSettings=config.json -e installModules=scheduler,cfmongodb coldFusion:2021.0.1

Run ColdFusion

Run ColdFusion image

// Lists supported commands and environment variables
docker run --rm -it coldfusion:latest help

// Returns the version no of the installed ColdFusion
docker run --rm -it coldfusion:latest info

// Runs a CFM page in C:/wwwroot/ via CLI
docker run --rm -it -e acceptEULA=YES -v C:/wwwroot/:/app 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 coldfusion:latest

To view a list of all running or stopped 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 coldfusion:latest help

Supported commands: help, start, info, cli <.cfm>
Webroot: /app
CAR imports: CAR files present in /data will be automatically imported during startup.

Env file

Required ENV Variables: 
                acceptEULA=YES 
Optional ENV variables: 
                serial=<ColdFusion Serial Key> 
                previousSerial=<ColdFusion Previous Serial Key (Upgrade)> 
                password=<Password> 
                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: 8993)> 
                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> 
                setupScriptDelete=<true/false(default) Auto delete setupScript post execution> 
                language=<ja/en (Default: en)> 
                installModules=<Comma delimited list of modules to be installed by CF Package Manager,accepts 'all' for installing all the available packages> 
                importCFSettings=<A JSON file containing the CF Settings to be imported . Must be present in the webroot, /app> 
                importCFSettingsPassphrase=<Passphrase to import CF settings from an encrypted JSON file.> 
                importModules=<A text file containing packages to be imported. Must be present in the webroot, /app>

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 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: 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

Run the image

To run a Docker image, the command syntax is:

docker run <product>:<version>

For example,

docker run addons:latest

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

docker run --rm addons:latest help

Environment variables

acceptEULA=YES 
solrUsername=<SOLR-USERNAME> 
solrPassword=<SOLR-PASSWORD> 
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

Hinweis:

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 and 2021 releases of ColdFusion.

Run the image

To run a Docker image, the command syntax is:

docker run <product>:<version>

For example,

docker run 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: 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 run 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: 
Adobe-Logo

Bei Ihrem Konto anmelden