-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building DockerImage fails with the current Go version #106
Comments
Hello @soodpr, I'm no longer with HPE but I used to work on this project before. You're technically not using the vendored dependencies, but rather, using your own. Rather than using The project pulls with no issue at all... If you do
Edit: I'm building the app with Go 1.11. Go has a compatibility promise. As long as the code doesn't change you can build old Go applications with newer versions of Go, so updating from Go 1.6.2 to 1.10.4 shouldn't make a difference in compilation result, but rather only in the compiled binary. |
+1 - thanks Patrick! |
@patrickdappollonio - Thanks for the response. I am trying to build the docker image which refers to DockerFile that contains go get commands as shown here https://github.com/HewlettPackard/oneview-golang/blob/ac3de6c231b1527a7ee0197f182b30f063d11416/Dockerfile#L3 I've modified the Go version to 1.10.4 and was able to build the docker image with the docker build command. So, thought that go get commands are failing with the previous GO version. |
Unfortunately, during my time there, I don't think anyone updated that file after we moved the code to Edit: most likely that Dockerfile was going to be used eventually to automate releases via Github (the project FROM golang:1.11
WORKDIR /go/src/github.com/HewlettPackard/oneview-golang
COPY . /go/src/github.com/HewlettPackard/oneview-golang
RUN go build github.com/HewlettPackard/oneview-golang
|
Trying to build the image results in below error:
Step 1/6 : FROM golang:1.6.2
---> 8ecba0e9bd48
Step 2/6 : RUN go get github.com/golang/lint/golint github.com/mattn/goveralls golang.org/x/tools/cover github.com/tools/godep github.com/aktau/github-release
---> Running in 44f55cfe816c
�[91m# golang.org/x/tools/go/internal/gcimporter
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:90: undefined: io.SeekCurrent
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:93: undefined: io.SeekCurrent
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:169: undefined: io.SeekCurrent
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:200: r.declReader.Reset undefined (type bytes.Reader has no field or method Reset)
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:239: r.declReader.Reset undefined (type bytes.Reader has no field or method Reset)
�[0m
�[91m# github.com/aktau/github-release
src/github.com/aktau/github-release/cmd.go:96: enc.SetIndent undefined (type *json.Encoder has no field or method SetIndent)
�[0m
Removing intermediate container 44f55cfe816c
The command '/bin/sh -c go get github.com/golang/lint/golint github.com/mattn/goveralls golang.org/x/tools/cover github.com/tools/godep github.com/aktau/github-release' returned a non-zero code: 2
Solution: Can be fixed by upgrading the Go version from 1.6.2 to 1.10.4
The text was updated successfully, but these errors were encountered: