Refactor the ostweaks file to allows a more easy reuse
Add a method on the osl.Sandbox interface to allow setting
knobs on the sandbox
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Fixdocker/docker#27539
After io.Copy(to, from), we should call to.CloseWrite(), not to.CloseRead().
Without this fix, TestTCP4ProxyHalfClose (newly added in this commit) fails as
follows:
--- FAIL: TestTCP4ProxyHalfClose (0.00s)
network_proxy_test.go:135: EOF
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
- Disable ipv6 on all interface by default at sandbox creation.
Enable IPv6 per interface basis if the interface has an IPv6
address. In case sandbox has an IPv6 interface, also enable
IPv6 on loopback interface.
Signed-off-by: Alessandro Boch <aboch@docker.com>
Rather than re-execing docker as the proxy, create a new command docker-proxy
that is much smaller to save memory in the case where there are a lot of
procies being created. Also allows the proxy to be replaced, for example
in Docker for Mac we have a proxy that proxies to osx instead of locally.
This is the vendoring pull for https://github.com/docker/docker/pull/23312
Signed-off-by: Justin Cormack <justin.cormack@docker.com>