Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideas for revamped docklet API #80

Open
wch opened this issue Oct 22, 2014 · 2 comments
Open

Ideas for revamped docklet API #80

wch opened this issue Oct 22, 2014 · 2 comments

Comments

@wch
Copy link
Collaborator

wch commented Oct 22, 2014

Right now, the docklet_* functions are basically wrappers for droplet_ssh that put "docker" as the first argument in the command. I suggest changing it so that a "docklet" (or some other name) is an object which refers to a specific docker container running on a droplet. You might have some functions like:

  • docklet_run(droplet, image, name): returns a docklet (not droplet) object.
  • docklet_kill(docklet)
  • docklet_running(docklet): returns TRUE if container is running.

Also, there would be some functions that operate on the docker system as a whole:

  • docker_images(droplet)
  • docker_pull(droplet, image)

And so on.

Now that I think of it some more, maybe this should be spun out into a separate package so that it could be used with other systems besides Digital Ocean - and even control local docker installations, in their various flavors (i.e., docker and boot2docker).

Thoughts?

@wch wch changed the title Ideas for revamped docket API Ideas for revamped docklet API Oct 22, 2014
@sckott
Copy link
Collaborator

sckott commented Oct 22, 2014

@wch I agree on the re-worked API and the separate package. @hadley ?

On the docklet API, I think that makes sense because we've made the droplet_* functions work on individual droplets, whereas with docklet_* functions you need to pass an image name to them, where there can be many within a droplet.

@wch
Copy link
Collaborator Author

wch commented Oct 22, 2014

I got started here: https://github.com/wch/harbor. If you guys want to be added to the repo, just let me know.

The function names will be container_* for commands specific to a particular container, and docker_* for commands for the docker system as a whole.

If you have suggestions for a better name, I'm open to suggestions -- there's a slight mismatch between the package name (harbor) and the command names (docker_*).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants