Short Description
Yes, it is finally here. A user-friendly interface to Docker, letting you run containers within your plug-ins in no time.
Documentation
It’s finally here! Icy’s very own interface to Docker, letting you run containers within your plug-ins in a developer-friendly way.
This plug-in is a high-level interface to docker-java, Docker’s official Java API. It lets you easily connect to your local Docker installation, create a container and run commands in it directly within Icy.
How to use
This plug-in provides an API called “DockerUtil” that provides high-level functions to start and run docker containers. To get a quick overview of the (minimalist, but effective) API, install the plug-in (e.g. via the almighty search bar), open-up a script editor (e.g. Javascript mode), start typing “Docker” until the auto-completion pops up and offers “DockerUtil”, hit the dot and “voila”.
Example (Java)script:
importClass(Packages.plugins.adufour.docker.DockerUtil)
alpine = DockerUtil.startContainer("gliderlabs/alpine") DockerUtil.runCommand(alpine, "echo hello Icy world!") DockerUtil.stopContainer(alpine)