Skip to content
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

Cannot build dockerfile #111

Open
jorgeo01 opened this issue Jun 3, 2022 · 0 comments
Open

Cannot build dockerfile #111

jorgeo01 opened this issue Jun 3, 2022 · 0 comments

Comments

@jorgeo01
Copy link

jorgeo01 commented Jun 3, 2022

Have a similar requirement to #86 where I cannot run gripmock via docker and would prefer a single binary if possible.

I’ve then attempted to follow/build the dockerfile to try and understand all the pieces.

First issue that I encountered was, the fact that this takes on golang:alpine latest version, which currently is 1.18.2. As of version 1.18.x, 'go get' is no longer supported outside a module and thus this failed

Log 1

 [ 6/22] RUN go get -u -v github.com/golang/protobuf/protoc-gen-go 	google.golang.org/grpc 	google.golang.org/grpc/reflection 	golang.org/x/net/context 	github.com/go-chi/chi 	github.com/lithammer/fuzzysearch/fuzzy 	golang.org/x/tools/imports:
#9 0.301 go: go.mod file not found in current directory or any parent directory.
#9 0.301 	'go get' is no longer supported outside a module.
#9 0.301 	To build and install a command, use 'go install' with a version,
#9 0.301 	like 'go install example.com/cmd@latest'
#9 0.301 	For more information, see https://golang.org/doc/go-get-install-deprecation
#9 0.301 	or run 'go help get' or 'go help install’.

I’ve tried to replace the base image from golang:alpine to golang:1.17-alpine but it fails in subsequent steps:

Log 2

ERROR [19/22] RUN go install -v                                                                                                                                                                  0.3s
------
 > [19/22] RUN go install -v:
#23 0.295 go: go.mod file not found in current directory or any parent directory; see 'go help modules’

Any idea what I might be doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant