How can I persist go 1.11 modules in a Docker container?
问题 I am migrating a Go 1.10 app to Go 1.11. This also includes migrating from dep to mod for managing dependencies. As the application depends on a database, I am using a docker-compose to set up the local development environment. With Go 1.10 I simply mounted the local repository (including the vendor folder) into the correct location in the container's GOPATH : web: image: golang:1.10 working_dir: /go/src/github.com/me/my-project volumes: - .:/go/src/github.com/me/my-project environment: -