Trying to spool up CF2021 - I tweaked my docker-co...
# docker-commandbox
j
Trying to spool up CF2021 - I tweaked my docker-compose file and CF and my app fire up but I get errors which I expected because I have no packages installed. But trying to use CFPM_INSTALL doesn't seem to be working. I can see cfconfig run but then I get an error complaining things can't connect: [ERROR] runwar.context: The sqlserver package is not installed. I only changed the image line and added the CFPM_INSTALL line in my file:
Copy code
cfml:
    container_name: cfml
    hostname: <http://local.foo.com|local.foo.com>
    image: ortussolutions/commandbox:adobe2021

    environment:
      CFPM_INSTALL: sqlserver
      BOX_SERVER_CFCONFIGFILE: myconfig.json
I sort of expected to see something in this section:
Copy code
| Dry run specified, exiting without starting server.
cfml       |    |------------------------------
cfml       |    | √ | Overriding server.json values from env vars
cfml       |    |   |----------------------------------------------------------
cfml       |    |   | Overridding [CFCONFIGFILE] with OS environment variable [BOX_SERVER_C
cfml       |    |   | FCONFIGFILE
cfml       |    |   | Overridding [RUNWAR.ARGS] with OS environment variable [BOX_SERVER_RU
cfml       |    |   | NWAR_ARGS
cfml       |    |   | Overridding [APP.SERVERHOMEDIRECTORY] with OS environment variable [B
cfml       |    |   | OX_SERVER_APP_SERVERHOMEDIRECTORY
cfml       |    |   | Overridding [APP.CFENGINE] with OS environment variable [BOX_SERVER_A
cfml       |    |   | PP_CFENGINE
cfml       |    |   |----------------------------------------------------------
cfml       |    | √ | Setting Server Profile to [development]
cfml       |    |   |------------------------------------------------------
cfml       |    |   | Profile set from profile property in server.json
cfml       |    |   | Block CF Admin disabled
cfml       |    |   | Block Sensitive Paths enabled
cfml       |    |   | Block Flash Remoting enabled
cfml       |    |   | Directory Browsing enabled
cfml       |    |   | File Caching disabled
cfml       |    |   |------------------------------------------------------
cfml       |    | √ | Loading CFConfig into server
cfml       |    |   |-------------------------------------------
cfml       |    |   | Found CFConfig JSON in "CFConfigFile" server.json key.
cfml       |    |   | Importing adobe config from [/app/myconfig.json]
cfml       |    |   | Config transferred from /app/myconfig.json!
cfml       |    |   | Found OS environment variable [cfconfig_adminPassword]
cfml       |    |   | Importing into [adobe]...
cfml       |    |   | [adminPassword] set.
cfml       |    |   |-------------------------------------------
Adding this to my server.json seems to work (found this in an old thread via search)... @jclausen I'd still be curious to know why CFML_INSTALL doesn't work in my docker-compose file?
Copy code
"scripts":{
		"onServerInstall":"cfpm install sqlserver"
	},
j
What are you using as the base image in your compose file? Are you using a Dockerfile?
j
No dockerfile. Just commandbox:cf2021 in my compose file.
j
Also, bash is case sensitive. Does the variable in your compose file match the casing (upper)?
j
I did do CFPM_INSTALL. I don't think I saw that message, I'm not at my work pc at the moment but will check Monday. Thanks for the help!