Docker – Is docker suitable to be used for long running containers

dockervirtualization

I'm currently migrating from a powerfull root server to a less powerfull and most notably cheaper server. On the root server i had some services isolated into separate VMs. On the new server this is not possible. But I'd like to still have some isolation for some services… If possible.

Currently I'm thinking of using docker for this isolation. But I'm not sure if docker is the right tool here. I tried to google for an answer but most posts i found about docker are only related to short term containers for development, ci or testing purposes. In my case it would be more like having a long term container that runs eg a web service stack with nginx, php and mysql/mariadb (while the db might even get its own container) and other container that run other services.

so my question is: Is Docker suitable for a task of running a container for a longer time. or in other words… is docker usable as a "replacement" for kvm based VMs?

Best Answer

Docker is used all over the place for web apps which are long running apps. Currently in production I have the following running in docker

  • php-fpm apps
  • celery queue workers (python)
  • nodejs apps
  • java tomcat7
  • Go