Go build helper script (#163)
Create a docker container and a script to call it, to help people build go plugins for use with fission.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
This is the Go environment for Fission.
|
||||
|
||||
It's a Docker image containing a Go 1.8rc3 runtime, along with a dynamic loader.
|
||||
It's a Docker image containing a Go 1.8 runtime, along with a dynamic loader.
|
||||
|
||||
## Build this image
|
||||
|
||||
@@ -27,3 +27,8 @@ fission env update --name go-runtime --image USER/go-runtime
|
||||
|
||||
After this, fission functions that have the env parameter set to the
|
||||
same environment name as this command will use this environment.
|
||||
|
||||
|
||||
## Creating functions to use this image
|
||||
|
||||
See the [examples README](examples/go/README.md).
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
FROM golang:1.8
|
||||
|
||||
ENV GOPATH /usr
|
||||
RUN go get github.com/fission/fission
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "No arguments, building current dir"
|
||||
filename='.'
|
||||
else
|
||||
filename=$1
|
||||
fi
|
||||
|
||||
docker run --rm -v $(pwd):/build -w /build fission/go-builder go build -buildmode=plugin -o function.so $filename && echo "Compiled plugin: function.so. Use 'fission function create' to upload to fission."
|
||||
Reference in New Issue
Block a user