overcast icon indicating copy to clipboard operation
overcast copied to clipboard

Add Docker as a provider

Open rehanift opened this issue 10 years ago • 2 comments

I use Docker instead of Vagrant/VirtualBox for local development.

Is there an interface/specification for creating new providers? I'd like to try and create one for Docker containers.

rehanift avatar Jun 24 '14 19:06 rehanift

That's a great idea :+1: :+1:

The existing providers were all built ad-hoc - I would like to clean that up since behavior and code style across the existing providers are pretty divergent, but I probably won't be getting to that in the near future. That said, if you want to dig in, modules/commands/virtualbox.js is pretty close to how the code would look if there was a common interface, so I would use that as a starting point.

andrewchilds avatar Jun 24 '14 20:06 andrewchilds

Hi Rehan, I've just finished cleaning up the codebase and creating a standard provider interface. There is still API complexity under the hood in each modules/providers/[provider].js, but there is an abstraction layer between the code that talks to the provider API and the standardized modules/provider.js file, which is now used by all of the provider commands.

If you are still interested in working on a Docker provider, there are a bunch of assumptions that I'm not comfortable making without getting some feedback from people that would use this, for example...

  1. Would you limit this to linux users only and require a docker binary, or do you also look for and support boot2docker users?

  2. How will provider commands work using Docker? I would expect them to behave like any other provider - meaning that I can create an instance (or container), run commands on it, ssh in, reboot, push/pull files, etc. The minimum command list would probably be:

    overcast docker boot [name]
    overcast docker create [name] [options...]
    overcast docker destroy [name] [options...]
    overcast docker reboot [name]
    overcast docker shutdown [name]
    

andrewchilds avatar Jan 05 '15 06:01 andrewchilds