Golang v2 environment -- runtime and builder (#427)
v2 environment for Go; includes runtime and builder.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd ${SRC_PKG}
|
||||
go build -buildmode=plugin -i -o ${DEPLOY_PKG} .
|
||||
@@ -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."
|
||||
Reference in New Issue
Block a user