With ubuntu 16.04 and docker-engine 1.11, the docker netns detection
function failed to look for the correct location of task file. This
change fixed the issue.
Signed-off-by: Zhenfang Wei <kopkop@gmail.com>
This commit adds build flags for the various architectures to prevent
failures when cross compiling. It also fixes errors in
netns_unspecified.go by replacing the undefined type Namespace with
NsHandle
Signed-off-by: Dave Tucker <dt@docker.com>
GetFromPid gets the namespace of the main thread, so previously Get
returned the wrong value if run from any other thread. Add a new
GetFromThread which uses the Linux thread id and switch Get to it.