Create development,staging and production env with docker in the same docker-machine

Hi guys,
I recently found out about docker and this might suit the needs of the company i am currently working for.
So far on my machine i wasnt able to run docker yet some errors with bcrypt 1.0.0…Anyways we will self host most of our applications so id like to know if you guys can help me in setting up those different environments…Id like to have a development environment,a testing/staging one and finally a production environment.All of those 3 should run in the same docker-machine and in the same container per app.

How can i do that?