Add helper_script for python3-clearlinux template

Give a chance to function developers to add extra
initial/helper operation when using the template
python3-clearlinux.

Signed-off-by: Qi Zheng <qi.zheng@intel.com>
This commit is contained in:
Qi Zheng
2019-12-11 05:25:39 +00:00
committed by qzheng527
parent 912af40d2c
commit cebabbf7ea
3 changed files with 10 additions and 0 deletions
+5
View File
@@ -72,6 +72,7 @@ Steps could refer to
├── hello-openfaas
│   ├── bundles.txt
│   ├── handler.py
│   ├── helper_script.sh
│   ├── __init__.py
│   └── requirements.txt
├── hello-openfaas.yml
@@ -89,6 +90,10 @@ Steps could refer to
`echo "openblas" >> hello-openfaas/bundles.txt`
`echo "wget" >> hello-openfaas/bundles.txt`
* Put any initial/helper operation in the "help_script.sh"
4. `faas-cli up -f hello-openfaas.yml`
Then you can invoke your python function by OpenFaas UI or faas-cli.
@@ -35,6 +35,10 @@ RUN for bundle in $(cat bundles.txt); do \
swupd bundle-add $bundle $swupd_args; \
done
# give a chance to run help script
COPY function/helper_script.sh .
RUN chmod +x helper_script.sh && ./helper_script.sh
WORKDIR /root/
COPY function function
@@ -0,0 +1 @@
#!/bin/bash