A Docker analogy

Imagine you developed your app with:
Windows 10
Apache 2.2
Mysql 5.5
PHP 5.3

While developing you made use of some specific Apache modules and some PHP functions that only work with your PHP version.

You find a hosting company like bluehost with their cpanel and all that. Your app works perfect until they decide to disable an Apache module because it's being exploited by one of the customers and they also upgrade PHP to patch a security risk. Overnight your web app stops working and it won't work anymore because the hosting company will not enable that Apache module ever again.

You have to go back to your WAMP local environment and disable the Apache module and update your PHP version to see how you can work around them to keep using your hosting provider.

With docker you can be sure that what works on your computer will always work on the remote host, because you are in charge of Apache, PHP and mysql.

Couldn't you bypass docker and install apache, php and mysql directly on the remote server? Yes of course. But it's a pain in the ass :slight_smile: Docker packages everything for you in a easy way and provides additional goodies.

With Docker you get simplicity and consistency.

You can dockerize a desktop application. Is it common? No. And there is not much literature about it on the internet.

3 Likes