openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Sciabarra <mich...@sciabarra.com>
Subject Re: Implementation plan for Go actions
Date Mon, 26 Feb 2018 20:08:14 GMT
On Mon, Feb 26, 2018, at 6:06 PM, Carlos Santana wrote:
> Hi Michele
> 
> >There is only one "annoyance" here: I noticed the dockerskeleton always
> expects a zip file including an "exec"
> 
> dockerskeleton suppports adding an exec straight, it will take the file do
> a chmod +x and executed.
> 
> So not sure what you are referring here as this is possible, maybe I miss
> understood

I use this script to post:
--- init.sh ---
#!/bin/bash
FILE=${1:?file}
echo '{"value":{"binary":true,"code":"'$(base64 $FILE)'"}}' >$FILE.json
curl -XPOST http://localhost:${PORT:-8080}/init -d @$FILE.json
----

exec is  the compilation of this sample: http://jamesthom.as/blog/2016/06/21/serverless-go-actions/

I launch the docker skeleton:

docker -p 8080:8080 -ti openwhisk/dockerskeleton 

If I post it as is:

./init.sh exec
I get:
err File is not a zip file

if I zip it:

zip exec.zip exec
./init.sh exec.zip

it works

Where am I wrong?


Mime
View raw message