title: Docker compose $GOPATH/go.mod exists but should not
body: <p>I have a Dockerfile that runs perfectly on it's own. </p>
  
  <p>But when I run it from <code>docker-compose up --build</code> </p>
  
  <p>I get: <code>$GOPATH/go.mod exists but should not</code></p>
  
  <p>Below is a snippet of terminal output.</p>
  
  <pre><code>Successfully tagged app_app:latest
  Starting golang_db ... done
  Starting golang_app ... done
  Attaching to golang_db, golang_app
  golang_app | $GOPATH/go.mod exists but should not
  .
  .
  golang_db | Version: '5.6.48'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
  golang_app exited with code 1
  
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <pre><code>#docker-compose.yml
  version: '3'
  services:
    db:
      build:
        context: ./MySQL
      environment:
        MYSQL_ROOT_PASSWORD: root
        MYSQL_DATABASE: test_db
        MYSQL_USER: docker
        MYSQL_PASSWORD: docker
      container_name: golang_db
      ports:
        - "3306:3306"
      tty: true
    app:
      build:
        context: ./Go
      volumes:
        - "./Go:/go"
      container_name: golang_app
      ports:
        - "9000:9000"
      tty: true
      depends_on:
        - db
  </code></pre>
  
  <pre><code>#Go/Dockerfile
  FROM golang:alpine AS builder
  ENV GO111MODULE=on
  RUN mkdir /app
  ADD . /app/
  WORKDIR /app
  COPY ./structs.go .
  COPY ./handlers.go .
  COPY ./server.go .
  COPY ./favicon.ico .
  COPY ./assets /assets
  RUN go mod init stuff.com
  RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(ls -1 *.go)
  EXPOSE 9000
  CMD ["go", "run", "."]
  </code></pre>
  
  <pre><code>#MySQL/Dockerfile
  FROM mysql:5.6
  COPY test.sql /docker-entrypoint-initdb.d/test.sql
  </code></pre>