Open vicary opened 7 years ago
That would be a fantastic addition! Honestly, I haven't done much with this recently, but would love to flesh it out and make it more useful. I'll try to take time this afternoon to look it over. If you'd like, in the meantime, feel free to suggest how you think those interfaces should look and/or see about working on it if you've got the itch!
I could start something in the coming weekend.
Basically I was thinking a node for each entity, list methods like mongodb2
.
sidenotes
docker.pull()
and endpoint in new Docker()
.msg.topic || this.name
be the name of container
, service
, volume
, network
... etc.http request
, or catch from the current event node?I didn't mean to lose track of this, oi. East coast, weather has been awful (and distracting).
That said, I think your idea is a good one. I'll update dockerode and do an initial POC this weekend (no kids! no chores!) when time comes around, and set up node-red to give it a whirl. By the way, I'm giving you contributor so that you can work on this directly if you'd like.
Thanks! I'll do most of the planning here for clarity.
Pushed up some changes I made today, along with a bit of cleaning up (still some to do, but time is rather limited). I'll keep poking at this as I have time! Contributions and criticism welcome.
Docker Cloud CLI uses $DOCKER_HOST
env var, shall we follow it by renaming docker-engine
to docker-host
?
i.e. Where shall we put docker.listContainers()
?
msg.container
.If we choose 1, it doesn't really matters; Otherwise the new node will become the best candidate for the name docker-engine
.
I'd debated over that, but didn't want to conflate an instance of the daemon with the machine hosting the daemon. I've had multiple running, for instance, at the same addressable endpoint. Was leaning towards the terminology the docker project seems to be using.
I'm pretty ambivalent about the wording, though! I've been trying to think of a way to structure things logically within red, and it's kind of eluding me. Need to throw it all up on a whiteboard or something.
Have you gotten a chance to try out the changes so far? I've been able to start/stop containers with the changes I've pushed up to the dev branch without issue, would like someone else to have a stab at it.
Yep the changes are working nicely.
I have been tinkering on the config node, adding tls-config
for remote machines, kinda stuck for a few days. Taking a breathe tbh.
I could really use
docker.run()
andcontainer.start()
indockerode
, what is your thoughts on grouping their functions into nodes?I'll see what I can do in a fork when the plan is clear.