Drupal on Docker
robknight.org.uk
robknight.org.uk
One container would contain the Drupal files along with an Nginx or Apache process.
One container would run PHP (probably PHP-FPM.)
One container would contain MySQL.
This would allow for better scaling options. You could then run multiple containers for PHP processes and have the web server do a round robin between PHP containers. You could do the same for the container which has the Drupal files and put a load balancer in front of them. Any file based caching options would probably be best switched to something like Memcache so that the cached items are in sync.I suppose some content management systems would better accommodate this setup than others.
I'm not sure yet the best way to do development in the above setup. I suppose one way would be to run an SSH server on the Drupal container and then perhaps mount the files you need access to as a drive using SSHFS or something. I haven't played with this yet, but you can also create volumes on the host OS to be shared with the container (I think I got that right.) Perhaps you could share the files that you need access to.
Am I right on this? Does anyone else do things differently? This project moves so fast it's hard to keep up with.
Edit: I also wonder if containers create a performance hit for MySQL. You would also need make backups. Maybe you would be better off running a big DB on its own dedicated server / VPS outside a container?
I would also save all user generated files (for something like Drupal, this would be mostly images) to something like S3.
Finally a sane Linux answer to FreeBSD jails. It's about time.
In this way I could still let people SSH into my box and put up their website with 0 risk of them every seeing the things I have on my SMB share? (yes this can be achieved with groups but this seems better.)
So if your stated aim is to use the LXC as a speed-break on hackers, don't rely on it.
I use ansible to provision my box into its role.
Docker is also, pardon my French, more "web 2.0"-ish software than all other 3:
* The Docker website is clean, modern, and attracts. It clearly tells me how to get started. They even invested time/money in a proper logo. Now look at the other websites. They look old, archaic, too formal, and looking at them don't give me the feeling that I should try out their software. The UML website gives off the feeling that it is unmaintained. I realize this isn't a purely technical reason, but presentation is important.
* Docker feels like it has more community around it. It uses Github and you can see that it's very active there. Docker also has an easy to use image repository. Apart from being extremely useful to pull in an image with a single command, it gives off the good feeling that there's an active community around it and that it's actively developed.