I've followed a couple of tutorials and am having trouble figuring out what i've done wrong. I suspect its a very basic principal but that said as i'm new to both GoLang and docker-compose i'm not 100% sure which is my problem.
I'm running the golang:build docker image which just retrieves a couple github repositories.
Any help would be much appreciated.
The error is as follows:
+ exec go get -v -d
can't load package: package app: no buildable Go source files in /go/src/app
Service 'ddd' failed to build: The command '/bin/sh -c go-wrapper download' returned a non-zero code: 1
The Docker-Compose file looks like this
ddd:
build: ./goSvc
working_dir: /go/src/
command: go run main.go
volumes:
- ./goSvc/src/main.go:/go/src/main.go
- ./goSvc/src/ddd:/go/src/ddd
ports:
- 8080:8080
environment:
- DB_NAME=rnse
- DEBUG=true
Go project structure
root
goSvc
pkg
src
ddd
internal
logic
...myGoFiles
github.com
main.go
Dockerfile
Edit: Including docker file for golang:
FROM golang:onbuild
RUN go get github.com/gorilla/mux
RUN go get github.com/lib/pq
EXPOSE 8080