skip to main content
Using a Command File
Arguments typically passed on the command line can be instead added to a JSON file. The JSON file should contain one property, called args which is an array of string objects. The array represents the ordered set of arguments (commands, subcommand and switches) exactly as they'd appear if passing them on the command line.
For example, passing the following JSON file to ICE Agent using the command:
agent /path/to/config.json as shown below.
{
 "args": [
   "external",
   "-s https://demo.icnow.app",
   "-k gu5hlp4glnf2qljh1xgiiu6vu475ga6pz4y69e5h75s5emlb2uro22mib4zd9vf4",
   "patch"
]
}
This is equivalent to invoking:
agent external \
 -s https://demo.icnow.app \
 -k gu5hlp4glnf2qljh1xgiiu6vu475ga6pz4y69e5h75s5emlb2uro22mib4zd9vf4 \
patch
The Agent will interpret the first argument as a configuration file if, and only if, the following two conditions are met:
There is only one argument passed to agent.
The argument refers to an existent, readable file.
As noted in the previous section, use the --mount or --volume switches to make the command file visible the agent application inside a Docker container.