Four ways to connect a docker container to a local network
This article discusses four ways to make a Docker container appear on a local network. These are not suggested as practical solutions, but are meant to illustrate some of the underlying network technology available in Linux. If you were actually going to use one of these solutions as anything other than a technology demonstration, you might look to the pipework script, which can automate many of these configurations. Goals and Assumptions In the following examples, we have a host with address 10.12.0.76 on the 10.12.0.0/21 network. We are creating a Docker container that we want to expose as 10.12.0.117. I am running Fedora 20 with Docker 1.1.2. This means, in particular, that my utils-linux package is recent enough to include the nsenter command. If you don't have that handy, there is a convenient Docker recipe to build it for you at jpetazzo/nsenter on GitHub. A little help along the way In this article we will often refer to the...


Comments
Post a Comment