title: Spawning a docker command yields an empty result
body: <p>I have the following Go code, where I try to spawn <code>docker</code> command and get its output:</p>
  
  <pre><code>package main
  
  import "fmt"
  import "os/exec"
  
  func main() {
      cmd := exec.Command("docker")
      cmdOutput, err := cmd.Output()
      if (err != nil) {
          panic(err)
      }
      fmt.Println(string(cmdOutput))
  }
  </code></pre>
  
  <p>But when I run this code as a result I get an empty string, which is stange since I get an output when I run <code>docker</code> command directly in a command line. </p>
  
  <p>Moreover, this same code yields results just fine if I spawn other commands with it, for example <code>ls</code>. </p>
  
  <p>What may be wrong here?</p>