Need help or advice ? Come to the Icy club ! - Every Wenesday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur
Register

User reviews

This plugin is not rated yet


Please log-in to post a review

Docker for Icy

by Alexandre Dufour

Yes, it is finally here. A user-friendly interface to Docker, letting you run containers within your plug-ins in no time.

Publication Id
ICY-B4X5B9
See technical details
View complete changelog

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)