Specify full golang version in Dockerfiles and build helper script (#227)

Addresses #222.

Plugins and the binaries loading them need to be built with the exact
same go version.

Also update README instructions.
This commit is contained in:
Soam Vasani
2017-06-09 15:36:09 -07:00
committed by GitHub
parent 93ef6fac53
commit 0207d13b23
5 changed files with 24 additions and 12 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.8
FROM golang:1.8.1
ENV GOPATH /usr
ENV APP ${GOPATH}/src/github.com/fission/fission/environments/go
+7 -1
View File
@@ -10,6 +10,13 @@ It's a Docker image containing a Go 1.8 runtime, along with a dynamic loader.
docker build -t USER/go-runtime . && docker push USER/go-runtime
```
Note that if you build the runtime, you must also build the go-builder
image, to ensure that it's at the same version of go:
```
cd builder && docker build -t USER/go-builder . && docker push USER/go-builder
```
## Using the image in fission
You can add this customized image to fission with "fission env
@@ -28,7 +35,6 @@ 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).
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.8
FROM golang:1.8.1
ENV GOPATH /usr
RUN go get github.com/fission/fission
+1 -1
View File
@@ -8,4 +8,4 @@ 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."
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."