Disable network in dockerRun

AFAICT none of the callers (which all involve one of `linuxkit/mkimage-*`) have
any reason to hit the network.

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2017-10-13 10:41:17 +01:00
parent 70c6aebd26
commit 8825ca2e66

View File

@ -28,7 +28,7 @@ func dockerRun(input io.Reader, output io.Writer, args ...string) error {
if err != nil {
return errors.New("Docker does not seem to be installed")
}
args = append([]string{"run", "--rm", "-i"}, args...)
args = append([]string{"run", "--network=none", "--rm", "-i"}, args...)
cmd := exec.Command(docker, args...)
cmd.Stdin = input
cmd.Stdout = output