
Convert Servers to Docker Containers - zwischenzug
https://zwischenzugs.wordpress.com/2015/05/24/convert-any-server-to-a-docker-container/
======
toomuchtodo
While a cool hack, please don't do this in production.

Its perfectly fine to import physical servers into virtual machine images, but
it completely defeats the purpose to dockerize whole servers.

~~~
vidarh
Does it? While I'd consider myself a relative purist in that I would prefer
container images that are as pruned down as possible, I also went through the
process years ago of turning 20+ physical servers into OpenVz containers.

While you lose out on some of the benefits in the short term, in the long term
you get the benefit that previously hard-to-decompose monolithic legacy setups
can be sliced and diced gradually until you have units that are reasonable to
start rebuilding cleanly. This one of those areas where layers etc. really are
quite useful.

E.g. lets say you have a web server with umpteen different web apps. Turn it
into a single container to begin with. Then export and create an image out of
the OS and web server, and dissect each of the web apps into layers on top and
separate it into one container per app. Now test a clean base image and try to
layer each app on top of it, and re-deploy individually as you've confirmed it
works.

~~~
adrianhoward
> _While you lose out on some of the benefits in the short term, in the long
> term you get the benefit that previously hard-to-decompose monolithic legacy
> setups can be sliced and diced gradually until you have units that are
> reasonable to start rebuilding cleanly. This one of those areas where layers
> etc. really are quite useful._

So. Much. This.

I work with very view greenfield projects. I work with a lot of existing,
complicated, annoying monolithic architectures. Approaches that let me start
refactoring those into something vaguely sane are a godsend.

~~~
zwischenzug
This is exactly what really happens.

------
kyledrake
Obviously this isn't a great way to use docker, but wow is it neat. I could
see this potentially be used to make a copy of a running legacy server as a
temporary solution or as an emergency backup.

Ah, there's a tool that does this in general, neat:
[http://devstructure.com/blueprint/](http://devstructure.com/blueprint/)

~~~
retr0h
The tool is quite old, and haven't seen updates in some time.

[https://github.com/devstructure/blueprint](https://github.com/devstructure/blueprint)

------
andridk
Convert Servers to Services. Convert Services to Containers

------
mrmondo
This is completely missing the point of containerisation.

If you're dumping a server or a large bunch of applications inside a container
you're doing it wrong.

I can't believe the number of people I've seen running practically whole
operating systems inside a container.

~~~
prodigal_erik
The point of containerization is to take services that conflict and run them
anyway on one kernel. If you already know your services are well enough
designed and packaged that they can coexist with just process boundaries, why
add overhead?

~~~
toomuchtodo
> The point of containerization is to take services that conflict and run them
> anyway on one kernel. If you already know your services are well enough
> designed and packaged that they can coexist with just process boundaries,
> why add overhead?

Multiple container overhead is insignificant when using lxc/docker
containerization (compared to more traditional virtualization).
Containerization exists to compartmentalize services for ease of management
and service segregation; to not segregate services defeats the purpose.

~~~
zwischenzug
Whose purpose?

My point is that technology's purpose is the use to which it is effectively
put, not authorial intention.

~~~
toomuchtodo
Pick the "correct" (most efficient) tool for the job.

~~~
zwischenzug
Yes, exactly: it depends on the problem you're trying to solve. They're not
always striaghtforwardly technical.

