Production server for docker

I have a server running debian 7 which I’m looking to upgrade the hardware. I’d like to start fresh with a new OS install and run everything (or most things) from containers.

What is the recommended setup for this? I get the idea I should install a base OS like Ubuntu LTS and then use Ubuntu Core for all my containers. (I’m assuming this is preferred to running, say, a CentOS based container on an Ubuntu host OS)

I’m running Nginx x 2 (standard repo and custom compiled for rtmp streaming), mysql and mail server (dovecot). Can I put all of these in a container? Ideally nothing would get installed/configured outside of a container for maximum portability. (Is there anything I shouldn’t containerize?)

I’ve just started learning docker, so if I’ve missed some key concepts, please point them out and I’ll go read more.

Thanks.

You can certainly run centos based containers on an ubuntu host.

I’m doing a similar migration for my personal VPS, and I am just containerizing one thing at a time until I can turn off the legacy server.

Containers are just a fancy way to run processes, so if it’s a process you can containerize it. All the services that you have mentioned have existing images that you can use.

/Jeff

Thanks Jeff. Any known performance issues when running a different OS in the container? In my mind using the same OS would use less resources and be more performant.

Containers aren’t a way to run a whole OS, just a way to run a process. The containers are sectioned off from your host OS and there isn’t really any sharing of resources between them. An nginx container will probably take up the same number of resources whether it happens to have a base filesystem that looks like a redhat install or an ubuntu install.

1 Like