April 13, 2016

Docker Tooling in Zend Studio

It's been a while since my last post, but today I've discovered something, and felt like sharing it.

In Zend Studio, you can install support tools for using Docker. You can list and manage containers and images with it.
Go to the Welcome page (Help menu -> Welcome), and select Docker from the Enhancements block, and click Apply changes. The IDE will ask for a restart, and when it comes back, you will have a new perspective called Docker Tooling, and some new views, Docker Explorer, Docker Images and Docker Containers.
To start using them, click the link in the Docker Explorer saying No connection ... click here etc., and in the popup dialog specify a name for the connection, select the TCP Connection option, and enter the IP address and port of your docker machine in the format of tcp://xxx.xxx.xxx.xxx:yyyy
In my case on my Mac I got the URI from the CLI for Docker using the printenv shell command, from the value of the DOCKER_HOST environment variable, so the result URI was tcp://192.168.99.100:2376. Enable authentication and enter the path from the DOCKER_CERT_PATH environment variable, which in my case was /Users/tom/.docker/machine/machines/default, then click Test Connection. If you see Ping succeeded message, you can click Ok and then Finish, and voila! you have your docker machine in the Docker Explorer with the containers and images.
I wish there was support also for docker-compose, but hey, you don't always get what you want.