From bbb65391143d48a4781e48d0875897a857a69d67 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Thu, 2 May 2019 17:16:30 -0700 Subject: Add [simple] network support to 'runsc do' Sandbox always runsc with IP 192.168.10.2 and the peer network adds 1 to the address (192.168.10.3). Sandbox IP can be changed using --ip flag. Here a few examples: sudo runsc do curl www.google.com sudo runsc do --ip=10.10.10.2 bash -c "echo 123 | netcat -l -p 8080" PiperOrigin-RevId: 246421277 Change-Id: I7b3dce4af46a57300350dab41cb27e04e4b6e9da --- runsc/container/container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runsc/container') diff --git a/runsc/container/container.go b/runsc/container/container.go index 884bbc0fb..3589272f2 100644 --- a/runsc/container/container.go +++ b/runsc/container/container.go @@ -906,7 +906,7 @@ func (c *Container) createGoferProcess(spec *specs.Spec, conf *boot.Config, bund // Start the gofer in the given namespace. log.Debugf("Starting gofer: %s %v", binPath, args) if err := specutils.StartInNS(cmd, nss); err != nil { - return nil, nil, err + return nil, nil, fmt.Errorf("Gofer: %v", err) } log.Infof("Gofer started, PID: %d", cmd.Process.Pid) c.GoferPid = cmd.Process.Pid -- cgit v1.2.3