Skip to content

NrgXnat/container-service

Repository files navigation

XNAT Container Service

XNAT plugin for controlling containers (primarily Docker containers).

To use it, you will need an XNAT running 1.8.0+. Get the containers-<version>-fat jar (through one of the methods below) and put it into your {xnat.home}/plugins directory. Restart tomcat and you are ready to run containers. See the guide to getting started.

This document is cross-posted on the XNAT wiki and the README in the source repository.

Getting the jar

Download

Releases are posted to the repository's Downloads page on Bitbucket. Download the version you want (probably the latest release) and deploy it to XNAT.

Build the jar

If you clone the source repository, you can build an XNAT plugin jar by running

[container-service] $ ./gradlew fatJar

The jar will be created as build/libs/containers-${VERSION}-fat.jar

Deploy to XNAT

One you have a jar, copy it to the ${xnat.home}/plugins directory, and restart tomcat.

Where is ${xnat.home}? If you are using a VM generated by the XNAT Vagrant project, xnat.home is in the ~/${PROJECT} directory (and the default value for ${PROJECT} is xnat). If you aren't using the Vagrant project, or even if you are and you're still confused, then ${xnat.home}/logs is where XNAT writes its logs; you'll want the plugins directory which should be right next to the logs directory.

Contributing

See CONTRIBUTING.md.