I am trying to build the very lightweight solution for zero downtime deployment for Java apps. For the sake of simplicity lets think that we have two servers. My solution is to
There is easy-deploy that does exactly that with Docker containers.
Deploy version 1
easy-deploy -p 80:80 -v some/path:other/path my-image:1
To deploy a new version just run the command with the updated tag name
easy-deploy -p 80:80 -v some/path:other/path my-image:2
Disclosure: I built this tool. I built it exactly because I couldn't find a simple solution for this problem.