title: "No Go files in..." error when i use go with docker compose
body: <p>I installed Go on Ubuntu 16.04. This is my GOPATH=/home/{username}/work.</p>
  
  <p>I created a project into /home/{username}/work/src.</p>
  
  <p>This is my project folder hierarchy.</p>
  
  <pre><code>project-name
     services
         configuration
             api
                 main.go
             Dockerfile
         bff
             api
                 main.go
             Dockerfile
     docker-compose.yml
     favicon.ico
     README.md
  </code></pre>
  
  <p>I can build and run with my dockerfile but I can't build and up with docker-compose.</p>
  
  <p>I couldn't find any solution.</p>
  
  <p>Configuration service dockerfile:</p>
  
  <pre><code>FROM golang:1.11.1-alpine3.8 as builder
  
  RUN apk update &amp;&amp; apk add git &amp;&amp; go get gopkg.in/natefinch/lumberjack.v2
  
  RUN mkdir -p /go/src/project-name/services/configuration
  RUN CGO_ENABLED=0
  RUN GOOS=linux
  ADD . /go/src/project-name/services/configuration
  ENV GOPATH /go
  WORKDIR /go/src/project-name/services/configuration/api
  RUN go get
  RUN go build
  
  FROM alpine
  RUN apk update
  RUN apk add curl
  
  RUN mkdir -p /app
  COPY --from=builder /go/src/project-name/services/configuration/api/ /app/
  RUN chmod +x /app/api
  WORKDIR /app
  EXPOSE 5001
  ENTRYPOINT ["/app/api"]
  </code></pre>
  
  <p>It works with dockerfile.</p>
  
  <p>This is my docker-compose file:</p>
  
  <pre><code>version: '3.4'
  
  services:
     bff:
        image: project-name/bff:${TAG:-latest}
        build:
             context: .
             dockerfile: services/bff/Dockerfile
        ports:
            - "5000:5000"
        container_name: bff 
        depends_on:
           - configuration
  
     configuration:
         image: project-name/configuration:${TAG:-latest}
         build:
              context: .
              dockerfile: services/configuration/Dockerfile    
         ports:
              - "5001:5001"
         container_name: configuration
  </code></pre>
  
  <p>It didn't work.</p>
  
  <p>When the “run go get” command runs, it gives an error, the error is: </p>
  
  <pre><code> can't load package: package project-name/services/configuration/api: no Go files in /go/src/project-name/services/configuration/api
   ERROR: Service 'configuration' failed to build: The command '/bin/sh -c go get' returned a non-zero code: 1
  </code></pre>