"--net" between containers


I might be making a syntax mistake, but I cannot join two containers via:

docker run -itd ubuntu

docker run -itd --net= ubuntu

Says network not found. This is Mac and Linux. I hope its my mistake. Docker 1.12.0.


You should pass network name after the --net flag

docker run -itd --net <network_name> ubuntu

You are correct. Thank you. I totally was misreading the docs. “container” is required, not a hint.