|
| 1 | +FROM ubuntu:noble AS app |
| 2 | + |
| 3 | +ARG SPESTIMATOR_VER="0.3.0.235" |
| 4 | + |
| 5 | +LABEL base.image="ubuntu:noble" |
| 6 | +LABEL dockerfile.version="1" |
| 7 | +LABEL software="Spestimator" |
| 8 | +LABEL software.version="${SPESTIMATOR_VER}" |
| 9 | +LABEL description="Uses 16S to identify a range of possible species." |
| 10 | +LABEL website="https://github.com/erinyoung/Spestimator" |
| 11 | +LABEL license="https://github.com/erinyoung/Spestimator/blob/main/LICENSE" |
| 12 | +LABEL maintainer="Erin Young" |
| 13 | +LABEL maintainer.email="eriny@utah.gov" |
| 14 | + |
| 15 | +# 'RUN' executes code during the build |
| 16 | +# Install dependencies via apt-get or yum if using a centos or fedora base |
| 17 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 18 | + ncbi-blast+ \ |
| 19 | + python3-pip && \ |
| 20 | + apt-get autoclean && rm -rf /var/lib/apt/lists/* |
| 21 | + |
| 22 | +RUN pip install --no-cache-dir --break-system-packages spestimator==${SPESTIMATOR_VER} && \ |
| 23 | + spestimator -h && \ |
| 24 | + mkdir /data |
| 25 | + |
| 26 | +ENV LC_ALL=C |
| 27 | + |
| 28 | +# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.' |
| 29 | +CMD [ "spestimator", "-h" ] |
| 30 | + |
| 31 | +# 'WORKDIR' sets working directory |
| 32 | +WORKDIR /data |
| 33 | + |
| 34 | +##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ##### |
| 35 | +##### Step 2. Set up the testing stage. ##### |
| 36 | +##### The docker image is built to the 'test' stage before merging, but ##### |
| 37 | +##### the test stage (or any stage after 'app') will be lost. ##### |
| 38 | +##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ##### |
| 39 | + |
| 40 | +# A second FROM insruction creates a new stage |
| 41 | +FROM app AS test |
| 42 | + |
| 43 | +# set working directory so that all test inputs & outputs are kept in /test |
| 44 | +WORKDIR /test |
| 45 | + |
| 46 | +RUN spestimator --help && \ |
| 47 | + spestimator --version |
| 48 | + |
| 49 | +RUN apt-get update && apt-get install -y wget |
| 50 | + |
| 51 | +RUN wget https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/900/636/985/GCF_900636985.1_45889_C01/GCF_900636985.1_45889_C01_genomic.fna.gz && \ |
| 52 | + gunzip GCF_900636985.1_45889_C01_genomic.fna.gz && \ |
| 53 | + spestimator -i *.fna -o testing.csv --download-genomes genomes && \ |
| 54 | + head testing.csv && \ |
| 55 | + ls genomes/* | wc -l |
0 commit comments