Reputation: 311
Can I use docker
to create a virtual server environment?
So I need everything separate, and a user who will get root
ssh access to that server and will install, for example cpanel/whm
and other software and run totally as separate virtual machine.
I see there are Docker images for centos, so I now need info about how to start docker, how to map my additional ip address to the docker container, and how to setup ssh and everything else.
User of virtual machine can not have access to root server.
and just for curiosity I am wondering how would you achieve this if you don't have additional ip addresses, and you need to run virtual server in docker container that will run nginx, mysql etc?
I suppose you could bind other ports to internal docker ports, like 8180 -> 80, but how would you bind a domain and route it to docker container?
edit: I have another question about Docker:
Why are people "dockerizing" separate applications instead to the whole stack?
Upvotes: 0
Views: 222
Reputation: 311456
Why people dockerizing separate applications instead to docker whole stack?
Because dockerizing individual services is ultimately more flexible, because you can re-use particular services in different configurations. In other words, these containers are "composable". Maybe you need a MySQL database to back your website's content management system...but maybe you also need a MySQL database to manage some sort of calendaring service. You can create groups of containers to implement these services either (a) sharing a single MySQL container or (b) each with their own dedicated MysQL container. In both cases, you were able to reuse the underlying MySQL image rather than having to build an entire stack from scratch. This applies to pretty much any other services as well.
Can i use docker to create virtual server environment?
Maybe. It depends how much you trust your users. Docker is primarily designed for resource isolation to enhance software distribution and resource management, not as a security solution. That said, people are absolutely using it in this fashion.
This article takes a look at some of the security concerns around Docker compared to virtual machines, and ways to mitigate those concerns. It's a little long in the tooth, but still worht a read.
Upvotes: 1