Cannot install docker pkg dependency in Go

I’m trying to use the docker package in one of my Go applications. I’m importing the package as import "" in my script. But when trying to build the dependencies, that is, when I run go get in my project directory, it says:

foo.go:9:2: no buildable Go source files in /home/neville/gocode/src/

Here, my GOPATH is set to /home/neville/gocode, so when doing go get, the package should get downloaded to /home/neville/gocode/pkg, instead of /home/neville/gocode/src. What am I missing here?

  • How to pass docker run command line arg to docker-compose?
  • automatically start /etc/init script in IBM Bluemix container
  • Docker compose php-fpm, nginx, mysql and use wp-cli on nginx
  • IP variable expansion in Kubernetes Pod definition
  • docker run long time make cache connection timedout
  • Create a network for two machines in docker that is not reachable from the host system
  • How can I use a local image as the base image with a dockerfile?
  • can't access own directory in docker created by ADD/chown/chmod in Dockerfile
  • Is Docker Swarm using multiple cores on same machine
  • Permissions issue with Docker volumes
  • non-loading with www dir, nginx, nette - set nginx path?
  • Understanding user file ownership in docker: how to avoid changing permissions of linked volumes
  • One Solution collect form web for “Cannot install docker pkg dependency in Go” isn’t a Go package, and that’s why there are no source files in that directory.

    Import the package you want directly, like so for the registry package:

    import ""

    Also, go get does download into $GOPATH/src. The installed object files go in $GOPATH/pkg.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.