0

I got the following setup:

Local

Running OSX on my MacBook. Node, Java, PostgreSQL etc... installed on OS.

Server

Running Ubuntu 14.04 on a VM Cluster. Node, Java, PostgreSQL etc... installed on OS.

As I want to represent the server environment on my local machine I first thought about recreating the exact same VM setup via an docker image. But this would mean that I need to be able to create a VM from a docker image, which is not possible at my current hoster (I can only choose a clean ubuntu OS which gets automatically installed, and then I have to install all dependencies manually).

So what are my options now? I only can think of the following two:

  1. install docker on the VM`s OS (which is also ubuntu) and run my ubuntu-docker image inside it. This seems suboptimal to me as I have to run the same Operating System twice.
  2. Switch to another hoster which supports setting up VMs from docker files

Or are there any other (better) ways?

Felix Hagspiel
  • 2,634
  • 2
  • 30
  • 43
  • Can you elaborate on why you would "need to be able to create a VM from a docker image"? – bluescores Jul 12 '17 at 13:00
  • Because that would mean that I do not have to run an OS via docker inside an OS. I know that there are hosters where I can upload a docker image and they create the VM based on the image. It just seems to me that this would save resources, but maybe I am wrong – Felix Hagspiel Jul 12 '17 at 13:04
  • 1
    Docker != VM. Docker doesn't use an OS to "run" a given image, it uses the Docker host. VM emulates hardware and OS, Docker doesn't; a Docker container is going to be much lighter than it's similar VM in practically every scenario. [See here for a great explanation of Docker vs VM](https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-normal-virtual-machine?rq=1) – bluescores Jul 12 '17 at 13:11

1 Answers1

1

I don't think you will lose much by installing docker and running that image. That's main purpose of Docker - running a bunch of environments on one machine using that machine as basis.