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