Skip to main content
Skip table of contents

DevOps Quick Reference for Containerized XNATs

Access your Containerized XNAT in the browser at one of two addresses:


For XNATs running in Docker-Compose Containers, these commands can be run in a terminal shell directly in the xnat-docker-compose folder for your running XNAT

CODE
$ docker-compose up -d

Starts or restarts five containers necessary to run a Dockerized XNAT ML instance -- "xnat-web" (the web application), "xnat-db" (the PostgreSQL database), "xnat-traefik" (the network config layer), "xnat-activemq" (JMS messaging queue), and "xnat-orthanc" (PACS instance)


CODE
$ docker-compose down

Stops all running XNAT containers but does not delete XNAT data, which is stored locally


CODE
$ docker-compose down --rmi all

Stops all running XNAT containers AND deletes the associated images, but does not delete XNAT data, which is stored locally


XNAT Application Commands

For XNATs running in Docker-Compose, these commands are run from the xnat-docker-compose folder, not from inside an SSH terminal.

CODE
$ docker-compose stop xnat-web

Shuts down your Tomcat instance, which will bring down your running XNAT. Used when installing plugins or making changes to the XNAT application war file itself.


CODE
$ docker-compose start xnat-web

Starts your Tomcat instance, which will then attempt to launch the installed XNAT application from its war file.


CODE
$ docker-compose logs -f --tail=20 xnat-web

View the live results of the Catalina log as Tomcat starts and runs. Contains useful debugging information when starting or restarting the XNAT application.


CODE
$ docker-compose exec xnat-web bash

Opens a limited SSH connection to the XNAT webapp in Docker. (Note: does not support sudo)


Useful File System Paths

Note: Docker-Compose gives you local mounts to core XNAT files on your local file system. Each of these paths is relative to the location of your xnat-docker-compose directory. The relevant part of the docker-compose.yml file that maps local resources to resources inside the container is:

CODE
    volumes:
      - ./xnat-data/archive:/data/xnat/archive
      - ./xnat-data/build:/data/xnat/build
      - ./xnat-data/config:/data/xnat/home/config
      - ./xnat-data/logs:/data/xnat/home/logs
      - ./xnat-data/plugins:/data/xnat/home/plugins
      - ./xnat-data/webapps:/usr/local/tomcat/webapps
      - ./xnat-data/tomcat:/usr/local/tomcat/logs
      - /var/run/docker.sock:/var/run/docker.sock


Specific resources are described below.


CODE
~/xnat-data/home

"XNAT Home". When you SSH into XNAT, this is your user's "~" home folder.


CODE
~/xnat-data/home/plugins

Installation location for XNAT Pipeline JAR files.


CODE
~/xnat-data/home/logs

Location of all XNAT-generated log files.


CODE
# /usr/local/tomcat/webapps

Location of your running XNAT application, accessible after opening a bash console to your xnat-web container. This will contain a directory that contains the exploded contents of the running war file. Most changes here require a Tomcat restart to take effect.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.