I have an old script that uses docker-machine create to create an number of Hyper-V VMs and run a server application inside each one, using docker. It was done this way because the application instances use hard-coded port numbers, and would run into port-collisions if all the application would try to bind to the same port. Creating a machine for each one prevents this collision because each machine has it's own IP. All the VMs are running on the same physical hardware.

docker-machine has been deprecated a while now, so what's the modern way to achieve the same?

What I'm looking for is to be able to run multiple instances of the server application on the same physical hardware, while also having all the applications listening to the same host port. While I realise that I would ideally remove the need for fixed port numbers, this is a bigger job than I can undertake right now because the port number is also hard-coded in deployed client applications.


1 Answer 1


Anything that hasicorp created.

  • Vagrant
  • Terraform
  • Ansible

All tools for automating deployment of VM's and packages running on top of the VM's. API-based and all major providers implement the API's, also for on premise there implementations from VMWare, Virtualbox etc.

Like you said there's many new terms to learn before you can work with it but it's a good path to follow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.