When compiling app-emulation/docker-1.13* (I'm not sure about 1.12*), the compile fails when you have <dev-lang/go-1.7 Building: bundles/1.13.0-rc4/dynbinary-daemon/dockerd-1.13.0-rc4 vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go:4:2: cannot find package "context" in any of: /var/tmp/portage/app-emulation/docker-1.13.0_rc4/work/docker-1.13.0_rc4/src/github.com/docker/docker/vendor/context (vendor tree) /usr/lib/go/src/context (from $GOROOT) /var/tmp/portage/app-emulation/docker-1.13.0_rc4/work/docker-1.13.0_rc4/src/context (from $GOPATH) /var/tmp/portage/app-emulation/docker-1.13.0_rc4/work/docker-1.13.0_rc4/src/github.com/docker/docker/vendor/src/context Updating to 1.7 solves this. This is a related bug report: https://github.com/docker/containerd/issues/337 "Context became part of the standard library in go 1.7. My guess is that your go version is below that number."
Please view https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/golang-base.eclass#n25 app-emulation/docker-1.13* inherits golang-base eclass, and there's a line DEPEND=">=dev-lang/go-1.7:=" modified on 2017-02-19 in golang-base.eclass, so I think this bug can now be marked as solved.