Add auto install of custom modules, functions in docker [Working sample]

Description

Script to automatically install custom modules, custom modules with unsafe permissions and whitelisted modules for functions according to set env variables.

Behavior

The first of the directory specified in N8N_CUSTOM_EXTENSIONS gets created and will be the install directory for custom modules (Delimiter ;)
example -e N8N_CUSTOM_EXTENSIONS="/home/jim/n8n/custom-nodes;/data/n8n/nodes

Custom modules are installed according to $CUSTOM_MODULES (Delimiter ;)
example -e CUSTOM_MODULES="n8n-nodes-suitecrm;n8n-nodes-dnc-activecampaign-legacy

Custom modules with unsafe-perms are installed according to $CUSTOM_MODULES_UNSAFEPERM (Delimiter ;)
example -e CUSTOM_MODULES_UNSAFEPERM="n8n-nodes-dnc-suitecrm

Custom modules for functions according to NODE_FUNCTION_ALLOW_EXTERNAL (such as date-fns) will be installed to /usr/local/lib “alongside of n8n” (Delimiter ,)
example -e NODE_FUNCTION_ALLOW_EXTERNAL="date-fns,date-fns-tz,feiertagejs

Dockerfile (apk add + bash)

Modified entrypoint (execute install-custom-modules.sh)

Actual script (install-custom-modules.sh)

I had to insert script execution in the docker-entrypoint.sh, because the folder /home/node/.n8n/custom needs to be created first.

I assume the concept is more valuable than my actual implementation right now, and a core dev should be able to figure out a more elegant way to implement it in live n8n. But if you wish, I can do a PR.