Application development/patches using docker

Hi,

I would like to understand better how community is using docker, to handle application development/patch/upgrades inside docker. Assuming a 3 tier application (database/application/frontend), that can potentially scale horizontally & vertically.
I see 2 approachs.
1)

  • Create a DockerFile for version 1.0 of the application
  • When time is needed to upgrade any component, create a new DockerFile, for version 2.0 of the same application
  • Stop running containers, and replace them with version 2.0.
  • Create a DockerFile for version 1.0 of the application
  • When time is needed to upgrade, create a new DockerFile, using “FROM” the 1.0 release.
  • Stop and redeploy the 2.0 versions.

The advantages I see with the 1) approach, is that if you application is design to be replaced easily (data on remote share, or persistent storage), you can cold-swap any containers. But you tie your containers to a specific release. However, option 2), creates deps on older release. Aka, 1.0 will always be required to build 2.0, and 3.0, and so forth.

How do you guys handle your application upgrades within Docker?

Cheers
Marc

Heya Marc,

we use option 1, with the added trick of tagging the image with the version number so you can roll back easily.

By keeping all the state information in volumes, you can upgrade and migrate while keeping the run time containers ephemeral.

Sven