|
| 1 | +ARG FASTPLONG_VER="0.2.2" |
| 2 | + |
| 3 | +FROM ubuntu:jammy AS app |
| 4 | + |
| 5 | +# List all software versions are ARGs near the top of the dockerfile |
| 6 | +# 'ARG' sets environment variables during the build stage |
| 7 | +# ARG variables are ONLY available during image build, they do not persist in the final image |
| 8 | +ARG FASTPLONG_VER |
| 9 | + |
| 10 | +# 'LABEL' instructions tag the image with metadata that might be important to the user |
| 11 | +LABEL base.image="ubuntu:jammy" |
| 12 | +LABEL dockerfile.version="1" |
| 13 | +LABEL software="fastplong" |
| 14 | +LABEL software.version="${FASTPLONG_VER}" |
| 15 | +LABEL description="Ultrafast preprocessing and quality control for long reads" |
| 16 | +LABEL website="https://github.com/OpenGene/fastplong" |
| 17 | +LABEL license="https://github.com/OpenGene/fastplong/blob/main/LICENSE" |
| 18 | +LABEL maintainer="Erin Young" |
| 19 | +LABEL maintainer.email="eriny@utah.gov" |
| 20 | + |
| 21 | +# 'RUN' executes code during the build |
| 22 | +# Install dependencies via apt-get or yum if using a centos or fedora base |
| 23 | +RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 24 | + libdeflate-dev \ |
| 25 | + libisal-dev \ |
| 26 | + libhwy-dev \ |
| 27 | + wget && \ |
| 28 | + apt-get autoclean && rm -rf /var/lib/apt/lists/* |
| 29 | + |
| 30 | +RUN wget --no-check-certificate -q http://opengene.org/fastplong/fastplong.${FASTPLONG_VER} && \ |
| 31 | + mv fastplong.${FASTPLONG_VER} /usr/local/bin/fastplong && \ |
| 32 | + chmod a+x /usr/local/bin/fastplong |
| 33 | + |
| 34 | +# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.' |
| 35 | +CMD [ "fastplong", "--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 | +# set working directory so that all test inputs & outputs are kept in /test |
| 50 | +WORKDIR /test |
| 51 | + |
| 52 | +RUN fastplong --help |
| 53 | + |
| 54 | +RUN wget --no-check-certificate -q https://zenodo.org/records/10733190/files/df_test_files.tar.gz && \ |
| 55 | + tar -xvf df_test_files.tar.gz && \ |
| 56 | + fastplong -i test_files/test.fastq.gz -o filtered.test.fastq.gz && \ |
| 57 | + ls filtered.test.fastq.gz |
0 commit comments