Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

make fails for both product-service and website-service #78

Open
mrichman opened this issue Jul 12, 2018 · 2 comments
Open

make fails for both product-service and website-service #78

mrichman opened this issue Jul 12, 2018 · 2 comments

Comments

@mrichman
Copy link

It looks like the gin dependency is not being pulled into the containers at make time:

make
Building Linux binary ready for containerisation...
docker run --rm -it -v "":/gopath -v "/User/Mark/github/aws-samples/ecs-refarch-cloudformation/services/product-service/src":/app -e "GOPATH=/gopath" -w /app golang:1.7 sh -c 'CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-s" -o app'
main.go:3:8: cannot find package "github.com/gin-gonic/gin" in any of:
        /usr/local/go/src/github.com/gin-gonic/gin (from $GOROOT)
        /gopath/src/github.com/gin-gonic/gin (from $GOPATH)
make: *** [binary] Error 1

I have the following paths shared in Docker:

/User/Mark/github/aws-samples/ecs-refarch-cloudformation/services/product-service/src
/User/Mark/github/aws-samples/ecs-refarch-cloudformation/services/website-service/src

Running Docker Version 18.03.1-ce-mac65 (24312) on macOS High Sierra

@mrichman mrichman changed the title make fails for both product-service and website-service make fails for both product-service and website-service Jul 12, 2018
@mrichman
Copy link
Author

Line 17 of the Makefile needs to call go get github.com/gin-gonic/gin:

docker run --rm -it -v "${GOPATH}":/gopath -v "$(CURDIR)":/app -e "GOPATH=/gopath" -w /app golang:1.10 sh -c 'go get -u -v github.com/gin-gonic/gin && CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-s" -o app'

@sushovannits
Copy link

Completely new to go and scratching my head over how to make this work. Spent hours but getting one error after another.

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

No branches or pull requests

2 participants