I have a command (docker run nextcloud) composed by my initscript from config:
/usr/bin/docker run --hostname nextcloud -p 8080:80 -e POSTGRES_PASSWORD=bogus -e POSTGRES_USER=postgres -e POSTGRES_DB=nextcloud -e POSTGRES_HOST=192.168.10.1 -e NEXTCLOUD_ADMIN_USER=admin -e NEXTCLOUD_ADMIN_PASSWORD=alsobogus -e NEXTCLOUD_TRUSTED_DOMAINS="nextcloud 192.168.10.1 www.rossco.dynu.com" -OWNCLOUD_SUB_URL=/nextcloud/ -v nextcloud:/var/www/html -v db:/var/lib/mysql nextcloud
which runs fine when directly run in console, but not using procd:
procd_set_param command $CMD $args where $CMD is /usr/bin/docker run and $args is rest of command.
If i strip "NEXTCLOUD_TRUSTED_DOMAINS="nextcloud 192.168.10.1 www.rossco.dynu.com" from $args, procd works OK
have tried double quoting, escaped quotes to no avail. What I am seeing appears consistent with procd using quotes internally, so any quotes in parameters prematurely truncate parameters.
This is part of putting infrastructure support (config, initscripts, DNS for containers) for docker: www.rossco.org
PROCD_DEBUG sez this
{ "name": "docker", "script": "\/etc\/init.d\/docker", "instances": { "instance1": { "stderr": true, "stdout": true, "command": [ "\/usr\/bin\/docker", "run", "--hostname", "nextcloud", "-p", "8080:80", "-e", "POSTGRES_PASSWORD=bogus", "-e", "POSTGRES_USER=postgres", "-e", "POSTGRES_DB=nextcloud", "-e", "POSTGRES_HOST=192.168.10.1", "-e", "NEXTCLOUD_ADMIN_USER=admin", "-e", "NEXTCLOUD_ADMIN_PASSWORD=alsobogus", "-e", "NEXTCLOUD_TRUSTED_DOMAINS=\"nextcloud", "192.168.10.1", "www.rossco.dynu.com\"", "-e", "OWNCLOUD_SUB_URL=\/nextcloud\/", "-v", "nextcloud:\/var\/www\/html", "-v", "db:\/var\/lib\/mysql", "nextcloud" ] } }, "triggers": [ ], "data": { } }
Any ideas how to pass quotes via procd?
Thanks;
Bill