wtsi-hgi/docker-baton

Name: docker-baton

Owner: Wellcome Trust Sanger Institute - Human Genetics Informatics

Description: baton in a Docker container

Created: 2015-11-10 12:44:44.0

Updated: 2017-10-03 10:24:47.0

Pushed: 2016-11-07 13:07:50.0

Homepage:

Size: 89

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status

baton in Docker

baton in a Docker container.

Variants

Docker Hub hosted versions of some of these Docker images are available at: https://hub.docker.com/r/mercury/baton/. The custom version builds are not on Dockerhub as it does not support the use of build arguments. The versions that are not tied to a specific commit (e.g. ones linked to a branch) are not hosted on Dockerhub as the commit used is determined at build time.

Hard-coded
Custom

To build a custom version of baton, BRANCH (either tag or branch name) and REPOSITORY must be given as build arguments.

Building the container

(You will only need to explicitly build the container if you are not using images from the Docker Hub repository.)

Before building a specific baton image, you must first build the corresponding base image:

Then, to build the baton image:

er build -t mercury/baton:x.xx.x-with-irods-x.x.x x.xx.x/irods-x.x.x

g.
er build -t mercury/baton:0.16.2-with-irods-4.1.8 0.16.2/irods-4.1.8
er build --build-arg BRANCH=0.16.1 --build-arg REPOSITORY=https://github.com/wtsi-npg/baton.git -t mercury/baton:custom-0.16.1-with-irods-3.3.1 custom/irods-3.3.1
Using the container
Running
Supplying configuration through environmental variables
er run -it -e IRODS_USERNAME=${username} -e IRODS_HOST=${host} -e IRODS_PORT=${port} -e IRODS_ZONE=${zone} -e IRODS_PASSWORD=${password} mercury/baton:${tag} ${baton_command}

g.
er run -it -e IRODS_HOST="192.168.99.100" -e IRODS_PORT=1247 -e IRODS_USERNAME="rods" -e IRODS_ZONE="iplant" -e IRODS_PASSWORD="rods" mercury/baton:0.16.1-with-irods-3.3.1 baton
er run -it --link icat:icat -e IRODS_HOST="icat" -e IRODS_PORT=1247 -e IRODS_USERNAME="rods" -e IRODS_ZONE="testZone" -e IRODS_PASSWORD="irods123" mercury/baton:0.16.2-with-irods-4.1.8 baton
Suppling configuration by mounting them
er run -it -v ${local_directory}:/root/.irods -e IRODS_PASSWORD=${password} mercury/baton:${tag} ${baton_command}

g.
er run -it -v /home/you/.irods:/root/.irods -e IRODS_PASSWORD="mypassword" mercury/baton:0.16.1-with-irods-3.3.1 baton
Notes
Testing software with a baton dependency

test-with-baton was made specifically to test software with a baton dependency. It handles all the setup of baton and iRODS, producing a set of binaries that will act in exactly the same way as if baton was installed on the test machine.

Using with a containerised instance of iRODS

If you wish to try baton with a test instance of iRODS, these iRODs server Docker images can be used.

Debugging

The best way to find out what is going on in the container is to go into a shell. To get into a shell, even if your iRODS connection setup has a problem, set DEBUG to 1:

er run -it -e DEBUG=1 mercury/baton:${tag} bash

To bypass the setup script all together:

er run -it --entrypoint=bash mercury/baton:${tag}

It is possible to use iRODs icommands to debug the configuration.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.