Reputation: 171
I had complete distributed setup of my components in Centos 6.5.
Components are Spring XD, Zookeeper, Kafka, Hadoop, Cassandra, Mongo and Spark. This setup is working fine in my local environment with three step process.
We did this setup with shell scripts, and there are several shell scripts.
I want to create a Docker image for the same setup.
Is it possible to create an image without again re-installing and config stuff in Docker?
Upvotes: 1
Views: 85
Reputation: 1330072
Normally, each of your components should be in its own image/container, specified by its own Dockerfile.
The idea is to get namespace isolation (filesystem/process) for each of them in order to minimize common inter-dependencies and side-effects: you can then change one piece of the system without compromising or even stopping the rest (depending on the nature of what you are changing)
That is what I have done in b2d (where my system, a git repo hosting server with Apache/NGiNX/LDAP/mcron/sshd/... is divided in containers)
If you still want to go the road of one giant image, you would still need to reinstall everything through a Dockerfile: the idea is to test how well your image can be reproduced, not to access a snapshot of your existing system (which we don't know how to rebuild/evolve)
See also a similar answer at "How do I create docker image from an existing CentOS?".
Upvotes: 1