Golang v2 environment -- runtime and builder (#427)

v2 environment for Go; includes runtime and builder.
This commit is contained in:
Soam Vasani
2017-12-06 23:03:05 -06:00
committed by GitHub
parent eed3018458
commit 1e6b7a4fc8
5 changed files with 99 additions and 18 deletions
+10 -1
View File
@@ -1,5 +1,14 @@
FROM golang:1.8.1
ARG BUILDER_IMAGE=fission/builder
ARG GO_VERSION=1.9.2
FROM ${BUILDER_IMAGE}
FROM golang:${GO_VERSION}
COPY --from=0 /builder /builder
ENV GOPATH /usr
RUN go get github.com/fission/fission
ADD build.sh /usr/local/bin/build
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
cd ${SRC_PKG}
go build -buildmode=plugin -i -o ${DEPLOY_PKG} .
-11
View File
@@ -1,11 +0,0 @@
#!/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:1.8.1 go build -buildmode=plugin -o function.so $filename && echo "Compiled plugin: function.so. Use 'fission function create' to upload to fission."