A JBoss Project
Red Hat

Latest posts

The current Docker tooling for Eclipse does not support Docker 1.7.1. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=473743 for more information.

Last week at DevNation I had the chance to show some of the cool features that we provide in JBoss Developer Studio, including the Docker tooling that we’ve built for Eclipse Mars and that was released last week[1].

I also recorded a screencast that highlights some of those Docker tooling features. The video shows how to:

  • Connect to a local Docker engine (0:32)

  • Start a PostgreSQL container with a custom username and password (1:52)

  • Build a custom image for Wildfly to include the PostgreSQL JDBC driver and configure a datasource (3:20)

  • Start a WildFly container linked to PostgreSQL, with exposed ports and a volume mounted on the host machine (6:44)

  • Import a Quickstart project using JBoss Central (8:30)

  • Deploy the project on the WildFly container using a Server Adapter with custom settings (9:55)

  • Connect to the JVM using the Remote Debugging tools (13:25)

I commented all the tasks as I recorded this screencast to highlight the important steps. Beware that if you run 'boot2docker', you’ll need to use a specific IP address instead of 'localhost' when creating the Server adapter in Eclipse (trust me, I made this mistake before…​)..

The dockerfile and its associated resources (module.xml, standalone.xml and JDBC driver) used during the demo is available on GitHub, so feel free to clone the repo and play with it ;-)

Keep in mind that some wizards showed in this screencast may be refactored in the near future, as we target Eclipse Mars SR1 at the end of September for a more complete version of the Docker tooling.

Feel free to discuss features and report bugs with us on the Docker component of Linux Tools at Eclipse.org. As usual, feedback is welcome!

Enjoy!
Xavier Coulon
@xcoulon


1 Docker tooling is part of Developer Studio since version 9.0.0.Beta1 and JBoss Tools users can install it from Eclipse Marketplace or from our Update site

Eclipse Mars has arrived, and with it comes a brand new Docker tooling for it.

This blog is a cross-post from Eclipse Newsletter: Landed On MARS where you can read about more things included in recent released Eclipse Mars.

Goals

We wanted to have a way to easily start/stop and deploy Docker containers directly from Eclipse.

We wanted something that would run on all three major platforms: Windows, Linux and OS X.

We wanted something that would work together with existing Docker command line tools, but also utilized provide better overview and easier/faster access to common operations, from a visual perspective.

We wanted it to be released with Eclipse Mars.

…​and that is what we got now.

This article runs through how to get it installed, the main features and what the future plans are.

Where do I get it ?

With Eclipse Mars released, you can get it from the Eclipse Mars updatesite, the feature is named Docker Tooling.

If you want to try the latest greatest builds you can use Linux Tools project nightly builds update site at http://download.eclipse.org/linuxtools/updates-docker-nightly/

To use the plugins, it is assumed that Docker is already installed. You can see Docker’s Installation guide on how to do this on various platforms.

Views and Perspectives

Once you have installed the Docker tooling, you will get access to three new views:

Docker Explorer

a tree view listing all connected Docker instances, with image and containers.

Docker Containers

a table view listing containers for selected Docker connection

Docker Images

a table view listing images available in the selected Docker connection

The easiest way to get to see these are by opening the Docker Tooling perspective.

Docker Tooling Perspective

In the screen above, the Docker tooling are connected to a locally running Docker deamon named boot2docker.

Connect

To configure this you click the Add Connection…​ button in the Docker Explorer view.

This will start a wizard that will try to detect your default Docker connection setup, dependent on your operating system.

Add Connection Wizard

In Linux it will use standard unix sockets and if on Windows or OSX, it will look for the following environment variables: DOCKER_HOST, DOCKER_TLS_VERIFY and DOCKER_CERT_PATH.

If neither of these are detectable, you can click Use custom connection settings and provide the connection info.

When you have the connection working you can get started using Docker images.

Pull individual images

To pull an image, you use the Pull Image in the Docker Image view.

Pull Image

Here, I’m simply pulling the jboss/wildfly image, a image amongst many available at http://hub.docker.com.

Run

To run the image, the easiest way is to right-click on the image in the Docker Explorer.

Run Image from Docker Explorer

Here, I’ve initially filtered the list to just show images matching wildfly and then using right-click to choose the Run Image…​ action.

Docker Run

From within this dialog you can also search in Docker Hub for other images by clicking Search…​.

Docker search

In this example, I’m only going to focus on running using the defaults, but in the Run Image wizard you can also configure ports, links, volumes, environment variables etc.

By default, we enable interactive and tty mode to allow you to interact with the docker container in the console (i.e. if the image asks for input).

When you click Finish, the container will start and show output in a Console and the Docker Containers view will show which ports are used.

Console

In here, the port at 8080 (the web server) is mapped to 32768 on the docker daemon.

To show this I just need to goto http://dockerhost:32768 to access it. dockerhost is the IP of the docker daemon.

Browse

Build

If you have a Dockerfile you can build it via the hammer icon on the Image view. This will start the Build wizard.

docker build

Once built, the image will show up and be possible to use for running.

Properties

You can view properties for all the various parts: connection, image and container, including getting a tree view of what docker inspect would show.

docker properties

Future

For Eclipse Mars we added all of the above base features and you can use it in your day-to-day work with Docker.

For Eclipse Mars SR1, we will work on getting some of the rough edges fixed, like 'Run' and 'Build' should be available in the context menu and not only in the views menu.

Work also started in Eclipse CDT to support using Docker images to build binaries for an OS other than the one you are running on. The vision for this would allow running on Windows or Mac, but target native deployment on multiple various Linux architectures.

Furthermore in JBoss Tools we are working on better integrating Docker with Eclipse server adapters, to ease deployment of your web applications to a Docker container. You can see how server deployment works with the current Docker tooling by leveraging docker volumes and remote deployment support.

If you have suggestions or find bugs, please open these in the Linux Tools project under Docker.

Have fun!

Max Rydahl Andersen
@maxandersen

Looking for older posts ? See the Archived entries.
back to top