Open wch opened 10 years ago
@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.
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_*).
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?