Deploying different versions of the same application stack in the same system
First of all, I would not recommend to use a single system for running stable and testing version both on the same system. There are many reasons for this such as:


Your testing version can cause cpu and memory spikes on system which will ultimately affect your stable version and end users.
Secondly, it will be difficult to manage the dependencies and resources for multiple versions in a single system. 
It can also take a lot of debugging time if the monitoring is not properly setup. 


Ideally, you should use 2 different system. One for running the stable version and other testing versions. It will be easy to manage and always a good practice to keep it on different stack.

Still, if you want to use a single system, then yes, you can use docker which will avoid a lot of conflict issues which can arise. Also, the dependencies and shared libraries can be managed easily with different docker images and running docker containers. 

If the team is proficient in docker, you can also use docker swarm to setup clusters. You can setup different clusters for stable and testing versions.

I hope you chose the best possible option and implement it.