<p>I have a small company network with the following services/servers:</p>

<ul>
<li>Jenkins</li>
<li>Stash (Atlassian)</li>
<li>Confluence (Atlassian)</li>
<li>LDAP</li>
<li>Owncloud</li>
<li>zabbix (monitoring)</li>
<li>puppet</li>
<li>and some Java web apps</li>
</ul>

<p>all running in separate kvm(libvirt)-vms in separate virtual-subnets on 2 machines (1 internal, 1 hetzner-rootserver) with shorewall inbetween. I'm thinking about switching to Docker.</p>

<p>But I have two questions:</p>

<ul>
<li>How can I achieve network security between docker containers (i.e. I want to prevent owncloud to access any host in the network except ldap-hosts-sslport)</li>
<li>Just by using docker-linking? If yes: does docker really allow to access only linked containers, but no others?</li>
<li>By using kubernetes?</li>
<li>By adding multiple bridging-network-interfaces for each container?</li>
<li>Would you switch all my infra-services/-servers to docker, or a hybrid solution with just the owncloud and the java-web-apps on docker?</li>
</ul>

stefa ng
<p>Regarding the multi-host networking: you're right that Docker links won't work across hosts. With Docker 1.9+ you can use "Docker Networking" like described in their blog post <a href="http://blog.docker.com/2015/11/docker-multi-host-networking-ga/" rel="nofollow">http://blog.docker.com/2015/11/docker-multi-host-networking-ga/</a></p>

<p>They don't explain how to secure the connections, though. I strongly suggest to enable TLS on your Docker daemons, which should also secure your multi-host network (that's an assumption, I haven't tried).</p>

<p>With Kubernetes you're going to add another layer of abstraction, so that you'll need to learn working with the pods and services concept. That's fine, but might be a bit too much. Keep in mind that you can still decide to use Kubernetes (or alternatives) later, so the first step should be to learn how you can wrap your services in Docker containers.</p>

<p>You won't necessarily have to switch everything to Docker. You should start with Jenkins, the Java apps, or OwnCloud and then get a bit more used to the Docker universe. Jenkins and OwnCloud will give you enough challenges to gain some experience in maintaining containers. Then you can evaluate much better if Docker makes sense in your setup and with your needs to be applied to the other services.</p>

<p>I personally tend to wrap everything in Docker, but only due to one reason: keeping the host clean. If you get to the point where everything runs in Docker you'll have much more freedom to choose where a service can run and you can move containers to other hosts much more easily.</p>

<p>You should also explore the Docker Hub, where you can find ready to run solutions, e.g. Atlassian Stash: <a href="https://hub.docker.com/r/atlassian/stash/" rel="nofollow">https://hub.docker.com/r/atlassian/stash/</a></p>

<p>If you need inspiration for special applications and how to wrap them in Docker, I recommend to have a look in <a href="https://github.com/jfrazelle/dockerfiles" rel="nofollow">https://github.com/jfrazelle/dockerfiles</a> - you'll find a bunch of good examples there.</p>
