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 "github.com/dotcloud/docker" 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/github.com/dotcloud/docker

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?

  • What is the default webapp location on the tomcat8 docker container?
  • docker aufs huge diff folder
  • Docker container specific disk quota
  • Why does “docker attach” hang?
  • Docker container memory usage
  • Docker Pull Python
  • Is it possible to turn Docker image into Windows executable for easy distribution?
  • Access to Docker container
  • Step by Step Setup Guide to Neo4j Mazerunner in Windows
  • How to run a jar file using docker image?
  • Destination location when using ADD command if <dest> is not provided
  • Can't create container on bluemix
  • One Solution collect form web for “Cannot install docker pkg dependency in Go”

    github.com/dotcloud/docker 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 "github.com/dotcloud/docker/registry"
    

    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.