You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
wch
changed the title
Ideas for revamped docket API
Ideas for revamped docklet API
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.
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_*).
Right now, the
docklet_*
functions are basically wrappers fordroplet_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?
The text was updated successfully, but these errors were encountered: