mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-08-26 18:35:58 +00:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user