Docker Community Forums

Share and learn in the Docker community.

Migrating an agency's multiple isolated LAMP sites to Docker containers

I’m looking at how a traditional small web agency would do this. They rent a dedicated Ubuntu server and have set up the various sites running Wordpress, Magento, Joomla each with their own set of email clients, MySQL and other misc linux services. One hostwide Apache process spawns child processes to service the requests. It listens on the server’s port 80 and uses virtual host header redirection to route traffic to the relevant site. Most of the sites have the same IP address. Similarly, one instance of MySQL is running globally with separate accounts for each site’s data.

How would you migrate this set up to docker? If you just ran separate apache instances, wouldn’t they all need their own ports to listen to? Would it make sense to run MySQL in one container which they all talked to, or each in their own, thus again creating port conflicts. Thanks.

You might want to look at this thread ; just replace wordpress with whatever main application you are going to use.