<p>Anything that hasicorp created.</p>
<ul>
<li>Vagrant</li>
<li>Terraform</li>
<li>Ansible</li>
</ul>
<p>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.</p>
<p>Like you said there's many new terms to learn before you can work with it but it's a good path to follow</p>

CC BY-SA 4.0
2021-11-26T08:11:05.160Z
2021-11-26T08:11:05.160Z
Serve Laurijssen
<p>I have an old script that uses <code>docker-machine create</code> 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.</p>
<p><code>docker-machine</code> has been deprecated a while now, so what's the modern way to achieve the same?</p>
<p>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.</p>

CC BY-SA 4.0
2021-11-23T22:11:05.813Z
Maybe a good candidate for docker-compose
mikequentel
CC BY-SA 4.0
2021-11-23T23:30:47.947Z
I agree, but can't make sense of all the network configuration combinations. Can you elaborate?
Craig
CC BY-SA 4.0
2021-11-29T15:23:03.967Z
Actually, using Swarm (which can be used with docker-compose) might be a good solution. https://docs.docker.com/engine/swarm/ingress and https://github.com/docker/labs/blob/master/beginner/chapters/votingapp.md
mikequentel
<docker><networking><docker-machine>
How to migrate away from `docker-machine create`?
Craig
# How to migrate away from `docker-machine create`?

(Asked by: username_0 on 2021-11-23)

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.

**Tags:** docker, networking, docker-machine

> **Comments:**
> **username_1**: Maybe a good candidate for docker-compose  
> **username_0**: I agree, but can't make sense of all the network configuration combinations. Can you elaborate?  
> **username_1**: Actually, using Swarm (which can be used with docker-compose) might be a good solution. https://docs.docker.com/engine/swarm/ingress and https://github.com/docker/labs/blob/master/beginner/chapters/votingapp.md  

---

## 1 answers

### Answer by username_2 on 2021-11-26. Score: -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


---

