Docker is mainly an app packaging mechanism of sorts. Just like you would build a jars, wars or rpms, etc. you create docker images for your applications. The advantage you get is that you can package all your dependencies in the container thereby making your application independent and using the tools provided by docker in combination with swarm, compose, etc. it makes deployment of your apps and scaling easier.
OpenVZ, LXC, solaris zones and bsd jails on the other hand or mainly run complete OS and the focus is quite different from packaging your applications and deployments.
Whether its the best way or not depends on one's opinion. But it allows you to maintain a history of your deployments and things like creating tags when you deploy which is helpful for me.
Yes, Travis CI does allow you to do this. But it deploys every passing build, so you can't choose which builds should be released and which shouldn't.
I'm not aware of what others do but I sure hope they use a CI service to release a gem as it makes it easier to track what all is going in and maintaining a history.
OpenVZ, LXC, solaris zones and bsd jails on the other hand or mainly run complete OS and the focus is quite different from packaging your applications and deployments.
You can also have a look at this blog which explains the differences more in detail: http://blog.risingstack.com/operating-system-containers-vs-a...