Efficient way Docker for testing,staging and production

Hi

I want to use the docker for testing staging and production server.which is best and efficient way to do the same on linux OS ???

I normally use an environment variable like DEV=true.