Skip to content

Commit

Permalink
Docker build fixes & perl locale fix (#89)
Browse files Browse the repository at this point in the history
* updated Docker build to fix perl locale problem

* found dependency issues that had broken the Docker build
so fixed them too

* changed the build so example FASTA files are copied from
the repo where the docker build is done (so that if these files are
changed in a branch/tag, that's reflected in the image that is built
rather than always referring back to the master branch on github)

* remove path-help email from Dockerfile, in line with PR #88

Co-authored-by: Tim Stickland <[email protected]>
  • Loading branch information
trstickland and Tim Stickland authored May 12, 2020
1 parent 29bfe03 commit 1009be2
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#
# This container will allow you to run MSLT by blast against assemblies using the schemes from PubMLST
#
FROM debian:testing
FROM ubuntu:20.04

#
# Authorship
#
MAINTAINER [email protected]
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -qq && \
apt-get install -y locales && \
sed -i -e 's/# \(en_GB\.UTF-8 .*\)/\1/' /etc/locale.gen && \
touch /usr/share/locale/locale.alias && \
locale-gen
ENV LANG en_GB.UTF-8
ENV LANGUAGE en_GB:en
ENV LC_ALL en_GB.UTF-8

#
# Set environment variables
Expand All @@ -16,12 +22,17 @@ ENV MLST_DATABASES /MLST_databases
#
# Update and Install dependencies
#
RUN apt-get update -qq && apt-get install -y wget ncbi-blast+ cpanminus gcc autoconf make libxml2-dev zlib1g zlib1g-dev libmodule-install-perl && cpanm -f Bio::MLST::Check
RUN apt-get update -qq && \
apt-get install -y wget ncbi-blast+ cpanminus gcc autoconf make libxml2-dev zlib1g zlib1g-dev libmodule-install-perl && \
# expat required for current versions of various XML packages in CPAN
apt-get install -y libexpat1-dev && \
# there's a known issue with one of the tests in XML::DOM::XPath
cpanm -notest XML::DOM::XPath && \
# install CPAN modules without --force so errors aren't hidden
cpanm Bio::MLST::Check

RUN mkdir -p /example && cd /example && \
wget -O sample1.fa https://github.com/sanger-pathogens/mlst_check/raw/master/example/input_data/Salmonella_enterica_subsp_enterica_serovar_Typhi_str_CT18_v1.fa && \
wget -O sample2.fa https://github.com/sanger-pathogens/mlst_check/raw/master/example/input_data/Salmonella_enterica_subsp_enterica_serovar_Typhimurium_DT104_v1.fa && \
wget -O sample3.fa https://github.com/sanger-pathogens/mlst_check/raw/master/example/input_data/Salmonella_enterica_subsp_enterica_serovar_Weltevreden_str_10259_v0.2.fa
# copy whatever example files are provided in the branch/tag that we're building from
COPY ./example/input_data/*.fa /example/

#
# Download the databases from PubMLST
Expand Down

0 comments on commit 1009be2

Please sign in to comment.