1 Introduction

This protocol explains how to create an RSAT Docker image.

It is primarily inteded for RSAT development team, but can also be of use for advanced users who might desire to create a customized Docker image.

2 Requirement

  • A computer with an operating system supporting Docker (Linux, Mac OSX or Winodows >= 10).
  • A sufficient disk space (3Gb for the RSAT-docker image + 3Gb for the temporary container + some space for the RSAT local disk).

3 Configuration

We will define some environment variables to indicate the RSAT release and the location where the RSAT docker will be installed on your hard drive. These must of course be adapted depending on the current state of RSAT distribution and on your local configuration.

export RSAT_RELEASE=2016-07-13
export RSAT_DOCKER_DIR=~/rsat_docker

3.1 For Max OSX and Windows: Virtualbox network configuration

4 Protocol

  1. Start a Docker daemon

The way to start a Docker daemon depends on the host operating system. See the documentation on Docker Web site for more details.

Resource URL
Docker https://www.docker.com/
Mac OSX Docker https://docs.docker.com/docker-for-mac/docker-toolbox/
Docker toolbox https://www.docker.com/products/docker-toolbox
Mac OSX Docker toolbox https://docs.docker.com/docker-for-mac/

All the next steps are assumed to run under a Unix terminal with an active docker daemon.

  1. Download and create a tag for RSAT-docker installation
docker pull debian:jessie
docker tag debian:jessie rsat_debian:${RSAT_RELEASE}.prepa
docker images
  1. Creating the shared space on the local machine

We define the root of the RSAT-docker space in an environment variable named RSAT_DOCKER_DIR. This can be adapted depending on your local configuration, but it should be on a hard drive with sufficient available disk space (~20Gb).

mkdir -p ${RSAT_DOCKER_DIR}/install
  1. Downloading the installation scripts.
cd ${RSAT_DOCKER_DIR}/install
wget --no-clobber http://teaching.rsat.eu/tutorials/DockerRSAT/scripts/RSAT_debian_install.sh
  1. vmatch licence

The sequence-purge tool requires a user-specific license for vmatch, a software tool developed by Stefan Kurtz. After having received this license, install the vmatch.lic in the folder ${RSAT_DOCKER_DIR}/install. This should be done manually.

  1. Start a container to create the RSAT docker container
docker run -t -i  -p 32810:80 --volume ${RSAT_DOCKER_DIR}/install:/RsatInstall rsat_debian:${RSAT_RELEASE}.prepa
  1. In the terminal of the container docker, run the RSAT instlalation script

Note: this script install all the Debian packages + Perl modules + other dependencies of RSAT, and then installs and configures the whole RSAT package. It takes ~1 hour as a whole, so be sure that you can have a steady connection to internet for a while before starting it.

cd /RsatInstall
(time sh RSAT_debian_install.sh  1> RsatInstall.log) 2>RsatInstall.err

The installation process starts, and stores all the terminal messages in two files:

  • RsatInstall.log standard output
  • RsatInstall.log standard error

These files will be stored in the install directory, which is shared between your docker container (path /RsatInstall) and the host machine (path ${RSAT_DOCKER_DIR}/install)

You can open a separate terminal to periodically check the tail of these files with the command tail, or follow the progress with tail -f.

export RSAT_DOCKER_DIR=~/rsat_docker
tail -f ${RSAT_DOCKER_DIR}/install/RsatInstall.log
  1. We how have a functional RSAT container, but if we shut it down, all our work will be lost. The next step is thus to create a persistent image of this docker, which we can then use to instantiate an RSAT docker container instantly on any machine where the image has been loaded.
docker ps
docker commit [container_name] rsat_debian:${RSAT_RELEASE}

5 Some useful docker commands

## List the docker images available on your computer
docker images

## List running docker containers
docker ps

## Docker version
docker version

## Detailed info about docker configuration
docker info