Here is the docker-compose file I tried for ColdFusion 2018,
version: '3.3'
services:
cf18:
environment:
- acceptEULA=YES
- password=admin
volumes:
- /opt/coldfusion/:/opt/coldfusion/
ports:
- 8500:8500
image: adobecoldfusion/coldfusion2018:latest
command: 'whoami'
It works but the volumes could not be mounted and I have a docker error log like below,
/opt/startup/start-coldfusion.sh: 523: cd: can't cd to /opt/coldfusion/cfusion/bin/
I need to mount this because the changes need to persist when I do Docker "docker-compose down" and "docker-compose up".
Any help would be greatly appreciated.
2
Answers
I found this repo of ColdFusion Docker Images, maintained by none other than Charlie Arehart:
https://github.com/carehart/awesome-cf-compose
Digging into this one shows the mount point for
/app
located in the repo’s folder structure.You shouldn’t mount the entire
/opt/coldfusion
folder to your host system. Only mount the sub-folders that you want to persist (like logs, etc). Below is an example of this from my coldfusion-docker-starter repo (https://github.com/dskaggs/coldfusion-docker-starter):Bind mounts do not have to be limited to directories either. You can mount a specific file from the host to a file in the container as well. For example, this is one way to mount the MySQL driver JAR files into the container so that ColdFusion can access them (I wouldn’t do this on production, just providing an example):
Edit: fixed indentation