Dockerised setup

Making it even easier to set up a custom Ensembl


Work in Progress

Having just released Lepbase v4, we're actively working on reorganising all our code and documentation and testing for/fixing any bugs. If you would like to set up your own Lepbase-style GenomeHub then you may like to try out the tutorials on

Dockerised setup allows you to set up a complete site like lepbase, including blast and downloads services using a set of five Docker containers. Lepbase-specific Docker images are available at

A set of slides from a presentation at PAG XXV describing this setup is available, which may be useful to fill in the gaps in this draft documentation.

For the example commands that follow, a straightforward directory structure is used to simplify versioning and backup, with subdirectories for most components containing configuration and data files.

β”œβ”€β”€ v4
β”‚   β”œβ”€β”€ blast
β”‚   β”‚   β”œβ”€β”€ blastdbs
β”‚   β”‚   └── conf
β”‚   β”œβ”€β”€ download
β”‚   β”‚   β”œβ”€β”€ conf
β”‚   β”‚   └── data
β”‚   β”œβ”€β”€ ensembl
β”‚   β”‚   β”œβ”€β”€ conf
β”‚   β”‚   └── logs
β”‚   └── import
β”‚       β”œβ”€β”€ conf
β”‚       └── data
└── mysql

The main exception is the ensembl directory, used for the EasyMirror docker container, which lacks a data subdirectory as it is linked to the mysql database container when used.


docker run -d \
           --name lb-mysql \
           -v ~/lepbase/mysql:/var/lib/mysql \
           -e MYSQL_RANDOM_ROOT_PASSWORD=yes \
           -e MYSQL_ROOT_HOST='' \

# run a container
           # call it lb-mysql
           # mount the mySQL directory
           # set environment variables
           # using this mysql container image

Then update the root password using docker exec -it lb-mysql bash and logging in to mysql using the GENERATED_ROOT_PASSWORD which can be found by running docker logs lb-mysql


nano ~/lepbase/v4/ensembl/conf/database.ini

# set passwords for database users

# specify Ensembl/EnsemblGenomes databases to download and 
  host locally (DB_HOST should be lb-mysql)
nano /home/ubuntu/lepbase/v4/ensembl/conf/setup.ini

# specify database connection settings

# specify Ensembl plugins to use

# specify species/comparative databases to use
docker run -d \
           --name lb-ensembl \
           -v ~/lepbase/v4/ensembl/conf:/ensembl/conf \
           -v ~/lepbase/v4/ensembl/logs:/ensembl/logs \
           --link lb-mysql:mysql/mysql-server \
           -p 8011:8080 \

# run a container
           # call it lb-ensembl
           # mount conf and logs directories
           # link to the lb-mysql container
           # map port for the website
           # using the lepbase easy-mirror container image


EasyImport is used to export files and index databases when setting up a mirror site. To use for new data import, additional flags will be required.

nano ~/lepbase/v4/import/conf/hmel2_core_32_85_1.ini

# specify database connection settings
docker run -d \
           --name lb-import-hmel2 \
           --link lb-mysql:mysql/mysql-server \
           -v ~/lepbase/v4/import/conf:/import/conf \
           -v ~/lepbase/v4/import/data:/import/data \
           -v ~/lepbase/v4/download/data:/import/download \
           -v ~/lepbase/v4/blast/blastdbs:/import/blast \
           -e DATABASE=hmel2_core_32_85_1 \
           -e FLAGS="-e -j -i" \

# run a container
           # call it lb-import-hmel2
           # link to the lb-mysql container
           # mount some directories
           # set some environment variables
           # using the lepbase easy-import container image


docker run -d \
           --name lb-download \
           -v ~/lepbase/v4/download/conf:/conf \
           -v ~/lepbase/v4/download/data:/var/www/v4 \
           -p 8012:80 \

# run a container
           # call it lb-download
           # mount some directories
           # map the port
           # using the lepbase h5ai image


docker run -d \
           --name lb-blast \
           -v ~/lepbase/v4/blast/conf:/conf \
           -v ~/lepbase/v4/blast/blastdbs:/dbs \
           -p 8013:4567 \

# run a container
           # call it lb-blast
           # mount some directories
           # map the port
           # using the lepbase sequenceserver image