Add sudo clause if your using osx or tcp

Fixes #3982

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)