From fe5c358e1344103a01840b194c0febb86e887a3a Mon Sep 17 00:00:00 2001 From: David Jones Date: Fri, 8 Feb 2019 09:26:48 +0000 Subject: [PATCH 01/10] Adding initial docker build info --- .dockerignore | 1 + Dockerfile | 68 ++++++++++++++++++++++++++++++++++++++++++ build/opt-build.sh | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 build/opt-build.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2c18acb --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +/LICENCE diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0a66344 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,68 @@ +FROM quay.io/wtsicgp/dockstore-cgpmap:3.0.4 as builder + +USER root + +RUN apt-get -yq update +RUN apt-get install -yq --no-install-recommends\ + locales\ + g++\ + make\ + gcc\ + pkg-config\ + zlib1g-dev + +RUN locale-gen en_US.UTF-8 +RUN update-locale LANG=en_US.UTF-8 + +ENV OPT /opt/wtsi-cgp +ENV PATH $OPT/bin:$OPT/biobambam2/bin:$PATH +ENV PERL5LIB $OPT/lib/perl5 +ENV LD_LIBRARY_PATH $OPT/lib +ENV LC_ALL en_US.UTF-8 +ENV LANG en_US.UTF-8 + +ADD build/opt-build.sh build/ +RUN bash build/opt-build.sh $OPT + +FROM ubuntu:16.04 + +LABEL maintainer="cgphelp@sanger.ac.uk" \ + uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Trust Sanger Institute" \ + version="1.0.0" \ + description="cgpPindel docker" + +RUN apt-get -yq update +RUN apt-get install -yq --no-install-recommends\ + apt-transport-https\ + locales\ + curl\ + ca-certificates\ + libperlio-gzip-perl\ + bzip2\ + psmisc\ + time\ + zlib1g\ + liblzma5\ + libncurses5\ + p11-kit + +RUN locale-gen en_US.UTF-8 +RUN update-locale LANG=en_US.UTF-8 + +ENV OPT /opt/wtsi-cgp +ENV PATH $OPT/bin:$OPT/biobambam2/bin:$PATH +ENV PERL5LIB $OPT/lib/perl5 +ENV LD_LIBRARY_PATH $OPT/lib +ENV LC_ALL en_US.UTF-8 +ENV LANG en_US.UTF-8 + +RUN mkdir -p $OPT +COPY --from=builder $OPT $OPT + +## USER CONFIGURATION +RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu + +USER ubuntu +WORKDIR /home/ubuntu + +CMD ["/bin/bash"] diff --git a/build/opt-build.sh b/build/opt-build.sh new file mode 100644 index 0000000..4377b32 --- /dev/null +++ b/build/opt-build.sh @@ -0,0 +1,73 @@ +#! /bin/bash + +set -xe + +if [[ -z "${TMPDIR}" ]]; then + TMPDIR=/tmp +fi + +set -u + +# cgpPindel +VER_CGPPINDEL="v3.0.1" + +if [ "$#" -lt "1" ] ; then + echo "Please provide an installation path such as /opt/ICGC" + exit 1 +fi + +# get path to this script +SCRIPT_PATH=`dirname $0`; +SCRIPT_PATH=`(cd $SCRIPT_PATH && pwd)` + +# get the location to install to +INST_PATH=$1 +mkdir -p $1 +INST_PATH=`(cd $1 && pwd)` +echo $INST_PATH + +# get current directory +INIT_DIR=`pwd` + +CPU=`grep -c ^processor /proc/cpuinfo` +if [ $? -eq 0 ]; then + if [ "$CPU" -gt "6" ]; then + CPU=6 + fi +else + CPU=1 +fi +echo "Max compilation CPUs set to $CPU" + +SETUP_DIR=$INIT_DIR/install_tmp +mkdir -p $SETUP_DIR/distro # don't delete the actual distro directory until the very end +mkdir -p $INST_PATH/bin +cd $SETUP_DIR + +# make sure tools installed can see the install loc of libraries +set +u +export LD_LIBRARY_PATH=`echo $INST_PATH/lib:$LD_LIBRARY_PATH | perl -pe 's/:\$//;'` +export PATH=`echo $INST_PATH/bin:$PATH | perl -pe 's/:\$//;'` +export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/:\$//;'` +export PERL5LIB=`echo $INST_PATH/lib/perl5:$PERL5LIB | perl -pe 's/:\$//;'` +set -u + +https://github.com/cancerit/cgpPindel/archive/v3.0.6.tar.gz +## vcftools +if [ ! -e $SETUP_DIR/cgpPindel.success ]; then + curl -sSL --retry 10 https://github.com/cancerit/cgpPindel/archive/${VER_CGPPINDEL}.tar.gz > distro.tar.gz + rm -rf distro/* + tar --strip-components 1 -C distro -xzf distro.tar.gz + cd distro + if [ ! -e $SETUP_DIR/cgpPindel_c.success ]; then + g++ -O3 -o $INST_PATH/bin/pindel c++/pindel.cpp + g++ -O3 -o $INST_PATH/bin/filter_pindel_reads c++/filter_pindel_reads.cpp + touch $SETUP_DIR/cgpPindel_c.success + fi + cd perl + cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps . + cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH . + cd $SETUP_DIR + rm -rf distro.* distro/* + touch $SETUP_DIR/cgpPindel.success +fi From bd9a7a055ce35ad559bfb3bacf728495bef631d9 Mon Sep 17 00:00:00 2001 From: David Jones Date: Fri, 8 Feb 2019 14:20:43 +0000 Subject: [PATCH 02/10] Adding initial docker build info --- build/opt-build.sh | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/build/opt-build.sh b/build/opt-build.sh index 4377b32..23463a9 100644 --- a/build/opt-build.sh +++ b/build/opt-build.sh @@ -11,6 +11,10 @@ set -u # cgpPindel VER_CGPPINDEL="v3.0.1" +#cgpVCFn& vcftools +VER_CGPVCF="v2.2.1" +VER_VCFTOOLS="0.1.15" + if [ "$#" -lt "1" ] ; then echo "Please provide an installation path such as /opt/ICGC" exit 1 @@ -52,8 +56,34 @@ export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/ export PERL5LIB=`echo $INST_PATH/lib/perl5:$PERL5LIB | perl -pe 's/:\$//;'` set -u -https://github.com/cancerit/cgpPindel/archive/v3.0.6.tar.gz ## vcftools +if [ ! -e $SETUP_DIR/vcftools.success ]; then + curl -sSL --retry 10 https://github.com/vcftools/vcftools/releases/download/v${VER_VCFTOOLS}/vcftools-${VER_VCFTOOLS}.tar.gz > distro.tar.gz + rm -rf distro/* + tar --strip-components 2 -C distro -xzf distro.tar.gz + cd distro + ./configure --prefix=$INST_PATH --with-pmdir=lib/perl5 + make -j$CPU + make install + cd $SETUP_DIR + rm -rf distro.* distro/* + touch $SETUP_DIR/vcftools.success +fi + +### cgpVcf +if [ ! -e $SETUP_DIR/cgpVcf.success ]; then + curl -sSL --retry 10 https://github.com/cancerit/cgpVcf/archive/${VER_CGPVCF}.tar.gz > distro.tar.gz + rm -rf distro/* + tar --strip-components 1 -C distro -xzf distro.tar.gz + cd distro + cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps . + cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH . + cd $SETUP_DIR + rm -rf distro.* distro/* + touch $SETUP_DIR/cgpVcf.success +fi + +## cgpPindel if [ ! -e $SETUP_DIR/cgpPindel.success ]; then curl -sSL --retry 10 https://github.com/cancerit/cgpPindel/archive/${VER_CGPPINDEL}.tar.gz > distro.tar.gz rm -rf distro/* From 179c4b7a11b77c44b6786b0097d59247052d5fa2 Mon Sep 17 00:00:00 2001 From: David Jones Date: Fri, 8 Feb 2019 16:37:14 +0000 Subject: [PATCH 03/10] Documentation and CHANGES.md added --- CHANGES.md | 8 +++++++ README.md | 63 ++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ac6e6e0..3218724 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,10 +1,18 @@ # CHANGES +## NEXT + +* Added Dockerfile and docker documentation + ## 3.0.6 + * Fixed version tag + ## 3.0.5 + * Handles species names with spaces in it * modified checks for species,assembly and checksum + ## 3.0.4 * Output bug for pindel BAM/CRAM corrected. When more than 1 chr in output files had no reads. diff --git a/README.md b/README.md index 521fa64..c31b794 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ cgpPindel contains the Cancer Genome Projects workflow for [Pindel][pindel-core]. +[![Quay Badge][quay-status]][quay-repo] + | Master | Develop | | --------------------------------------------- | ----------------------------------------------- | | [![Master Badge][travis-master]][travis-base] | [![Develop Badge][travis-develop]][travis-base] | @@ -18,12 +20,16 @@ Contents: -- [Docker, Singularity and Dockstore](#docker-singularity-and-dockstore) -- [Dependencies/Install](#dependenciesinstall) -- [Creating a release](#creating-a-release) - - [Preparation](#preparation) - - [Cutting the release](#cutting-the-release) -- [LICENCE](#licence) +- [cgpPindel](#cgppindel) + - [Docker, Singularity and Dockstore](#docker-singularity-and-dockstore) + - [Dependencies/Install](#dependenciesinstall) + - [Creating a release](#creating-a-release) + - [Preparation](#preparation) + - [Release process](#release-process) + - [Code changes](#code-changes) + - [Docker image](#docker-image) + - [Cutting the release](#cutting-the-release) + - [LICENCE](#licence) @@ -31,12 +37,13 @@ Contents: There are pre-built images containing this codebase on quay.io. +* [cgpPindel][cgpPindel-git]: Contained within this repository - contains the cgpPindel package * [dockstore-cgpwxs][ds-cgpwxs-git]: Contains tools specific to WXS analysis. * [dockstore-cgpwgs][ds-cgpwgs-git]: Contains additional tools for WGS analysis. These were primarily designed for use with dockstore.org but can be used as normal containers. -The docker images are know to work correctly after import into a singularity image. +The docker images know to work correctly after import into a singularity image. ## Dependencies/Install @@ -66,15 +73,34 @@ Please be aware that this expects basic C compilation libraries and tools to be * Commit/push all relevant changes. * Pull a clean version of the repo and use this for the following steps. -### Cutting the release +### Release process + +This project is maintained using HubFlow. + +#### Code changes + +1. Make appropriate changes +2. Update `perl/lib/Sanger/CGP/Pindel.pm` to the correct version (adding rc/beta to end if applicable). +3. Update `CHANGES.md` to show major items. +4. Run `./prerelease.sh` +5. Check all tests and coverage reports are acceptable. +6. Commit the updated docs and updated module/version. +7. Push commits. + +#### Docker image -1. Update `perl/lib/Sanger/CGP/Pindel.pm` to the correct version (adding rc/beta to end if applicable). -1. Update `CHANGES.md` to show major items. -1. Run `./prerelease.sh` -1. Check all tests and coverage reports are acceptable. -1. Commit the updated docs and updated module/version. -1. Push commits. 1. Use the GitHub tools to draft a release. +2. Build image locally +3. Run example inputs and verify any changes are acceptable +4. Bump version in `Dockerfile` +5. Push changes + +#### Cutting the release + +1. Check state on Travis +2. Generate the release (add notes to GitHub) +3. Confirm that image has been built on [quay.io][quay-builds] +4. Update the [dockstore][dockstore-cgpPindel] entry, see [their docs][dockstore-get-started]. ## LICENCE @@ -114,9 +140,18 @@ identical to a statement that reads ‘Copyright (c) 2005, 2006, 2007, 2008, [pcap-core-rel]: https://github.com/cancerit/PCAP-core/releases [ds-cgpwxs-git]: https://github.com/cancerit/dockstore-cgpwxs [ds-cgpwgs-git]: https://github.com/cancerit/dockstore-cgpwgs +[cgpPindel-git]: https://github.com/cancerit/cgpPindel [pindel-core]: http://gmt.genome.wustl.edu/pindel/current [travis-base]: https://travis-ci.org/cancerit/cgpPindel [travis-master]: https://travis-ci.org/cancerit/cgpPindel.svg?branch=master [travis-develop]: https://travis-ci.org/cancerit/cgpPindel.svg?branch=dev + + +[quay-status]: https://quay.io/repository/wtsicgp/cgpPindel/status +[quay-repo]: https://quay.io/repository/wtsicgp/cgpPindel +[quay-builds]: https://quay.io/repository/wtsicgp/cgpPindel?tab=builds + + +[dockstore-cgpPindel]: https://dockstore.org/containers/quay.io/wtsicgp/cgpPindel From 7216ee32983068fdc5fdc484a2ccefdec11898a3 Mon Sep 17 00:00:00 2001 From: David Jones Date: Fri, 8 Feb 2019 16:57:23 +0000 Subject: [PATCH 04/10] Update Readme according to PR feedback --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c31b794..4ec8b56 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ There are pre-built images containing this codebase on quay.io. These were primarily designed for use with dockstore.org but can be used as normal containers. -The docker images know to work correctly after import into a singularity image. +The docker images are known to work correctly after import into a singularity image. ## Dependencies/Install From be1d4e5735c14be9b27bd82cee4679819466c943 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Thu, 9 May 2019 19:54:22 +0000 Subject: [PATCH 05/10] Clean build using local git checkout --- .dockerignore | 8 +++++ Dockerfile | 11 ++++++- build/opt-build-local.sh | 65 ++++++++++++++++++++++++++++++++++++++++ build/opt-build.sh | 26 ---------------- 4 files changed, 83 insertions(+), 27 deletions(-) create mode 100755 build/opt-build-local.sh diff --git a/.dockerignore b/.dockerignore index 2c18acb..1ca6004 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,9 @@ /LICENCE +/prerelease.sh +/README.md +/INSTALL +/LICENCE +/CHANGES.md +/.gitignore +/perl/docs +/perl/docs.tar.gz diff --git a/Dockerfile b/Dockerfile index 0a66344..f45a69c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,11 @@ -FROM quay.io/wtsicgp/dockstore-cgpmap:3.0.4 as builder +FROM quay.io/wtsicgp/dockstore-cgpmap:3.1.4 as builder USER root +# ALL tool versions used by opt-build.sh +ENV VER_CGPVCF="v2.2.1" +ENV VER_VCFTOOLS="0.1.16" + RUN apt-get -yq update RUN apt-get install -yq --no-install-recommends\ locales\ @@ -21,9 +25,14 @@ ENV LD_LIBRARY_PATH $OPT/lib ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 +# build tools from other repos ADD build/opt-build.sh build/ RUN bash build/opt-build.sh $OPT +# build the tools in this repo, separate to reduce build time on errors +COPY . . +RUN bash build/opt-build-local.sh $OPT + FROM ubuntu:16.04 LABEL maintainer="cgphelp@sanger.ac.uk" \ diff --git a/build/opt-build-local.sh b/build/opt-build-local.sh new file mode 100755 index 0000000..9cfb57b --- /dev/null +++ b/build/opt-build-local.sh @@ -0,0 +1,65 @@ +#! /bin/bash + +set -xe + +if [[ -z "${TMPDIR}" ]]; then + TMPDIR=/tmp +fi + +set -u + +if [ "$#" -lt "1" ] ; then + echo "Please provide an installation path such as /opt/ICGC" + exit 1 +fi + +# get path to this script +SCRIPT_PATH=`dirname $0`; +SCRIPT_PATH=`(cd $SCRIPT_PATH && pwd)` + +# get the location to install to +INST_PATH=$1 +mkdir -p $1 +INST_PATH=`(cd $1 && pwd)` +echo $INST_PATH + +# get current directory +INIT_DIR=`pwd` + +CPU=`grep -c ^processor /proc/cpuinfo` +if [ $? -eq 0 ]; then + if [ "$CPU" -gt "6" ]; then + CPU=6 + fi +else + CPU=1 +fi +echo "Max compilation CPUs set to $CPU" + +SETUP_DIR=$INIT_DIR/install_tmp +mkdir -p $SETUP_DIR/distro # don't delete the actual distro directory until the very end +mkdir -p $INST_PATH/bin +cd $SETUP_DIR + +# make sure tools installed can see the install loc of libraries +set +u +export LD_LIBRARY_PATH=`echo $INST_PATH/lib:$LD_LIBRARY_PATH | perl -pe 's/:\$//;'` +export PATH=`echo $INST_PATH/bin:$PATH | perl -pe 's/:\$//;'` +export MANPATH=`echo $INST_PATH/man:$INST_PATH/share/man:$MANPATH | perl -pe 's/:\$//;'` +export PERL5LIB=`echo $INST_PATH/lib/perl5:$PERL5LIB | perl -pe 's/:\$//;'` +set -u + +## cgpPindel - should be the build root +if [ ! -e $SETUP_DIR/cgpPindel.success ]; then + cd $INIT_DIR + if [ ! -e $SETUP_DIR/cgpPindel_c.success ]; then + g++ -O3 -o $INST_PATH/bin/pindel c++/pindel.cpp + g++ -O3 -o $INST_PATH/bin/filter_pindel_reads c++/filter_pindel_reads.cpp + touch $SETUP_DIR/cgpPindel_c.success + fi + cd perl + cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps . + cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH . + cd $SETUP_DIR + touch $SETUP_DIR/cgpPindel.success +fi diff --git a/build/opt-build.sh b/build/opt-build.sh index e0643d3..21b0ff4 100644 --- a/build/opt-build.sh +++ b/build/opt-build.sh @@ -8,13 +8,6 @@ fi set -u -# cgpPindel -VER_CGPPINDEL="v3.1.0" - -#cgpVCFn& vcftools -VER_CGPVCF="v2.2.1" -VER_VCFTOOLS="0.1.15" - if [ "$#" -lt "1" ] ; then echo "Please provide an installation path such as /opt/ICGC" exit 1 @@ -82,22 +75,3 @@ if [ ! -e $SETUP_DIR/cgpVcf.success ]; then rm -rf distro.* distro/* touch $SETUP_DIR/cgpVcf.success fi - -## cgpPindel -if [ ! -e $SETUP_DIR/cgpPindel.success ]; then - curl -sSL --retry 10 https://github.com/cancerit/cgpPindel/archive/${VER_CGPPINDEL}.tar.gz > distro.tar.gz - rm -rf distro/* - tar --strip-components 1 -C distro -xzf distro.tar.gz - cd distro - if [ ! -e $SETUP_DIR/cgpPindel_c.success ]; then - g++ -O3 -o $INST_PATH/bin/pindel c++/pindel.cpp - g++ -O3 -o $INST_PATH/bin/filter_pindel_reads c++/filter_pindel_reads.cpp - touch $SETUP_DIR/cgpPindel_c.success - fi - cd perl - cpanm --no-interactive --notest --mirror http://cpan.metacpan.org --notest -l $INST_PATH --installdeps . - cpanm -v --no-interactive --mirror http://cpan.metacpan.org -l $INST_PATH . - cd $SETUP_DIR - rm -rf distro.* distro/* - touch $SETUP_DIR/cgpPindel.success -fi From bece5c6182119615f3e04f5693fda2eaaa493360 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Thu, 9 May 2019 20:01:40 +0000 Subject: [PATCH 06/10] Attempt docker based CI --- .travis.yml | 75 +++++++++++++++++------------------------------------ 1 file changed, 24 insertions(+), 51 deletions(-) diff --git a/.travis.yml b/.travis.yml index f84a890..0ef1975 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,58 +2,31 @@ notifications: slack: wtsi-cgpit:ptUMR1tkNyZJYd9TpGoss8WR email: false -env: - - CC=gcc +sudo: false -addons: - apt: - update: true - packages: - - build-essential - - autoconf - - bsdtar - - time - - curl - - libcurl4-openssl-dev - - nettle-dev - - zlib1g-dev - - libncurses5-dev - - libpstreams-dev - - unzip - - libpng12-dev - - libexpat1-dev - - libgoogle-perftools-dev - - lsof - - libbz2-dev - - liblzma-dev - - libgnutls-dev - - libtasn1-6-dev - - p11-kit - - libxml2-dev - - libgd-dev - - psmisc - - libdb-dev - -install: true - -language: perl - -perl: - - "5.22-shrplib" +services: + - docker script: - set -e - - export PATH=$HOME/install/bin:$HOME/install/biobambam2/bin:$PATH - - git clone --depth 1 --single-branch --branch develop https://github.com/cancerit/cgpBigWig.git - - cd cgpBigWig - - ./setup.sh $HOME/PCAP-opt - - cd ../ - - git clone --depth 1 --single-branch --branch develop https://github.com/cancerit/PCAP-core.git - - cd PCAP-core - - ./setup.sh $HOME/PCAP-opt - - cd ../ - - git clone --depth 1 --single-branch --branch dev https://github.com/cancerit/cgpVcf.git - - cd cgpVcf - - ./setup.sh $HOME/PCAP-opt - - cd ../ - - ./setup.sh $HOME/PCAP-opt + - echo 'Build and check docker image' + - docker build -t cgpPindel . + - docker images | grep -c cgpPindel + - echo 'Verify program(s) from each inherited base image - dockstore-cgpbigwig' + - docker run -t --rm cgpPindel bwjoin --version + - echo 'Verify program(s) from each inherited base image - dockstore-cgpmap' + - docker run -t --rm cgpPindel ds-cgpmap.pl -h + - docker run -t --rm cgpPindel bwa_mem.pl -version + - docker run -t --rm dcgpPindel bammarkduplicates2 --version + - docker run -t --rm cgpPindel samtools --version + - docker run -t --rm cgpPindel bash -c 'bwa 2>&1 | grep Version' + - echo 'Verify program(s) from this repo' + - docker run -t --rm cgpPindel pindel.pl --version + - docker run -t --rm cgpPindel pindel_input_gen.pl --version + - docker run -t --rm cgpPindel pindel_2_combined_vcf.pl --version + - docker run -t --rm cgpPindel FlagVcf.pl --version + - docker run -t --rm cgpPindel pindel_merge_vcf_bam.pl --version + - docker run -t --rm cgpPindel pindel_np_from_vcf.pl --version + - docker run -t --rm cgpPindel pindel_germ_bed.pl --version + - docker run -t --rm cgpPindel pindel --version + - docker run -t --rm cgpPindel filter_pindel_reads --version From fbbeec168a40b0848cca7527518da253e27aa028 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Thu, 9 May 2019 20:05:04 +0000 Subject: [PATCH 07/10] docker image tags need to be lowercase --- .travis.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0ef1975..e960865 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,23 +10,23 @@ services: script: - set -e - echo 'Build and check docker image' - - docker build -t cgpPindel . - - docker images | grep -c cgpPindel + - docker build -t cgppindel . + - docker images | grep -c cgppindel - echo 'Verify program(s) from each inherited base image - dockstore-cgpbigwig' - - docker run -t --rm cgpPindel bwjoin --version + - docker run -t --rm cgppindel bwjoin --version - echo 'Verify program(s) from each inherited base image - dockstore-cgpmap' - - docker run -t --rm cgpPindel ds-cgpmap.pl -h - - docker run -t --rm cgpPindel bwa_mem.pl -version + - docker run -t --rm cgppindel ds-cgpmap.pl -h + - docker run -t --rm cgppindel bwa_mem.pl -version - docker run -t --rm dcgpPindel bammarkduplicates2 --version - - docker run -t --rm cgpPindel samtools --version - - docker run -t --rm cgpPindel bash -c 'bwa 2>&1 | grep Version' + - docker run -t --rm cgppindel samtools --version + - docker run -t --rm cgppindel bash -c 'bwa 2>&1 | grep Version' - echo 'Verify program(s) from this repo' - - docker run -t --rm cgpPindel pindel.pl --version - - docker run -t --rm cgpPindel pindel_input_gen.pl --version - - docker run -t --rm cgpPindel pindel_2_combined_vcf.pl --version - - docker run -t --rm cgpPindel FlagVcf.pl --version - - docker run -t --rm cgpPindel pindel_merge_vcf_bam.pl --version - - docker run -t --rm cgpPindel pindel_np_from_vcf.pl --version - - docker run -t --rm cgpPindel pindel_germ_bed.pl --version - - docker run -t --rm cgpPindel pindel --version - - docker run -t --rm cgpPindel filter_pindel_reads --version + - docker run -t --rm cgppindel pindel.pl --version + - docker run -t --rm cgppindel pindel_input_gen.pl --version + - docker run -t --rm cgppindel pindel_2_combined_vcf.pl --version + - docker run -t --rm cgppindel FlagVcf.pl --version + - docker run -t --rm cgppindel pindel_merge_vcf_bam.pl --version + - docker run -t --rm cgppindel pindel_np_from_vcf.pl --version + - docker run -t --rm cgppindel pindel_germ_bed.pl --version + - docker run -t --rm cgppindel pindel --version + - docker run -t --rm cgppindel filter_pindel_reads --version From 8328f73fb1a64e10539f7a2f5c2de9b1ddb34317 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Thu, 9 May 2019 20:21:52 +0000 Subject: [PATCH 08/10] Fix typo, pindel C++ programs don't have version option --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e960865..a6e402c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,9 +15,8 @@ script: - echo 'Verify program(s) from each inherited base image - dockstore-cgpbigwig' - docker run -t --rm cgppindel bwjoin --version - echo 'Verify program(s) from each inherited base image - dockstore-cgpmap' - - docker run -t --rm cgppindel ds-cgpmap.pl -h - docker run -t --rm cgppindel bwa_mem.pl -version - - docker run -t --rm dcgpPindel bammarkduplicates2 --version + - docker run -t --rm cgppindel bammarkduplicates2 --version - docker run -t --rm cgppindel samtools --version - docker run -t --rm cgppindel bash -c 'bwa 2>&1 | grep Version' - echo 'Verify program(s) from this repo' @@ -28,5 +27,5 @@ script: - docker run -t --rm cgppindel pindel_merge_vcf_bam.pl --version - docker run -t --rm cgppindel pindel_np_from_vcf.pl --version - docker run -t --rm cgppindel pindel_germ_bed.pl --version - - docker run -t --rm cgppindel pindel --version - - docker run -t --rm cgppindel filter_pindel_reads --version + - docker run -t --rm cgppindel which pindel + - docker run -t --rm cgppindel which filter_pindel_reads From 238a5deb449092a9484bd5eb9af2673f37ac691e Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Fri, 10 May 2019 09:19:40 +0000 Subject: [PATCH 09/10] Shrink context --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 1ca6004..aa69bb0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,5 +5,6 @@ /LICENCE /CHANGES.md /.gitignore +/.git /perl/docs /perl/docs.tar.gz From 07a3bcd4454e11208b9904167dcb0c8776f66211 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Fri, 10 May 2019 09:20:43 +0000 Subject: [PATCH 10/10] Add security update funtionality, clean up --- Dockerfile | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index f45a69c..efffa68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,13 +7,13 @@ ENV VER_CGPVCF="v2.2.1" ENV VER_VCFTOOLS="0.1.16" RUN apt-get -yq update -RUN apt-get install -yq --no-install-recommends\ - locales\ - g++\ - make\ - gcc\ - pkg-config\ - zlib1g-dev +RUN apt-get install -yq --no-install-recommends \ +locales \ +g++ \ +make \ +gcc \ +pkg-config \ +zlib1g-dev RUN locale-gen en_US.UTF-8 RUN update-locale LANG=en_US.UTF-8 @@ -41,19 +41,23 @@ LABEL maintainer="cgphelp@sanger.ac.uk" \ description="cgpPindel docker" RUN apt-get -yq update -RUN apt-get install -yq --no-install-recommends\ - apt-transport-https\ - locales\ - curl\ - ca-certificates\ - libperlio-gzip-perl\ - bzip2\ - psmisc\ - time\ - zlib1g\ - liblzma5\ - libncurses5\ - p11-kit +RUN apt-get install -yq --no-install-recommends \ +apt-transport-https \ +locales \ +curl \ +ca-certificates \ +libperlio-gzip-perl \ +bzip2 \ +psmisc \ +time \ +zlib1g \ +liblzma5 \ +libncurses5 \ +p11-kit \ +unattended-upgrades && \ +unattended-upgrade -d -v && \ +apt-get remove -yq unattended-upgrades && \ +apt-get autoremove -yq RUN locale-gen en_US.UTF-8 RUN update-locale LANG=en_US.UTF-8