|
| 1 | +FROM python:3.11.11-slim AS app |
| 2 | + |
| 3 | +ARG TOULIGQC_VER="2.8.4" |
| 4 | + |
| 5 | +# 'LABEL' instructions tag the image with metadata that might be important to the user |
| 6 | +LABEL base.image="python:3.11.11-slim" |
| 7 | +LABEL dockerfile.version="1" |
| 8 | +LABEL software="ToulligQC" |
| 9 | +LABEL software.version="${TOULIGQC_VER}" |
| 10 | +LABEL description="QC analyses of Oxford Nanopore runs" |
| 11 | +LABEL website="https://github.com/GenomiqueENS/toulligQC" |
| 12 | +LABEL license="https://github.com/GenomiqueENS/toulligQC/blob/master/LICENSE.txt" |
| 13 | +LABEL maintainer="Erin Young" |
| 14 | +LABEL maintainer.email="eriny@utah.gov" |
| 15 | + |
| 16 | +# 'RUN' executes code during the build |
| 17 | +# Install dependencies via apt-get or yum if using a centos or fedora base |
| 18 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 19 | + wget \ |
| 20 | + ca-certificates\ |
| 21 | + procps \ |
| 22 | + bzip2 && \ |
| 23 | + apt-get autoclean && rm -rf /var/lib/apt/lists/* |
| 24 | + |
| 25 | +RUN wget -q https://github.com/GenomiqueENS/toulligQC/archive/refs/tags/v${TOULIGQC_VER}.tar.gz && \ |
| 26 | + pip install --no-cache-dir v${TOULIGQC_VER}.tar.gz && \ |
| 27 | + rm -rf v${TOULIGQC_VER}.tar.gz |
| 28 | + |
| 29 | +# 'ENV' instructions set environment variables that persist from the build into the resulting image |
| 30 | +# Use for e.g. $PATH and locale settings for compatibility with Singularity |
| 31 | +ENV PATH="$PATH" \ |
| 32 | + LC_ALL=C |
| 33 | + |
| 34 | +# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.' |
| 35 | +CMD [ "toulligqc", "--help" ] |
| 36 | + |
| 37 | +# 'WORKDIR' sets working directory |
| 38 | +WORKDIR /data |
| 39 | + |
| 40 | +##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ##### |
| 41 | +##### Step 2. Set up the testing stage. ##### |
| 42 | +##### The docker image is built to the 'test' stage before merging, but ##### |
| 43 | +##### the test stage (or any stage after 'app') will be lost. ##### |
| 44 | +##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ##### |
| 45 | + |
| 46 | +# A second FROM insruction creates a new stage |
| 47 | +FROM app AS test |
| 48 | + |
| 49 | +ARG TOULIGQC_VER |
| 50 | + |
| 51 | +# set working directory so that all test inputs & outputs are kept in /test |
| 52 | +WORKDIR /test |
| 53 | + |
| 54 | +# print help and version info; check dependencies (not all software has these options available) |
| 55 | +# Mostly this ensures the tool of choice is in path and is executable |
| 56 | +RUN toulligqc --help && \ |
| 57 | + toulligqc --version |
| 58 | + |
| 59 | +RUN wget -q http://outils.genomique.biologie.ens.fr/leburon/downloads/toulligqc-example/toulligqc_demo_data.tar.bz2 && \ |
| 60 | + tar -xvjf toulligqc_demo_data.tar.bz2 && \ |
| 61 | + cd toulligqc_demo_data && \ |
| 62 | + ./run-toulligqc.sh && \ |
| 63 | + ls /test/toulligqc_demo_data/output/ToulligQC_Demo_Data/report.html \ |
| 64 | + /test/toulligqc_demo_data/output/ToulligQC_Demo_Data/report.data \ |
| 65 | + /test/toulligqc_demo_data/output/ToulligQC_Demo_Data/images/*html |
0 commit comments