-
Notifications
You must be signed in to change notification settings - Fork 119
/
Dockerfile
62 lines (51 loc) · 1.59 KB
/
Dockerfile
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
# for easy upgrade later. ARG variables only persist during build time
ARG HTSLIBVER="1.16"
FROM ubuntu:focal as app
ARG HTSLIBVER
LABEL base.image="ubuntu:focal"
LABEL dockerfile.version="1"
LABEL software="htslib"
LABEL software.version="${HTSLIBVER}"
LABEL description="A C library for reading/writing high-throughput sequencing data"
LABEL website="https://github.com/samtools/htslib"
LABEL license="https://github.com/samtools/htslib/blob/develop/LICENSE"
LABEL maintainer1="Erin Young"
LABEL maintainer1.email="[email protected]"
LABEL maintainer2="Curtis Kapsak"
LABEL maintainer2.email="[email protected]"
# install dependencies, cleanup apt garbage
# It's helpful when they're all listed on https://github.com/samtools/htslib/blob/develop/INSTALL
RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
ca-certificates \
make \
bzip2 \
autoconf \
automake \
make \
gcc \
perl \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libcurl4-gnutls-dev \
libssl-dev && \
rm -rf /var/lib/apt/lists/* && apt-get autoclean
# get htslib and make /data
RUN wget https://github.com/samtools/htslib/releases/download/${HTSLIBVER}/htslib-${HTSLIBVER}.tar.bz2 && \
tar -vxjf htslib-${HTSLIBVER}.tar.bz2 && \
rm htslib-${HTSLIBVER}.tar.bz2 && \
cd htslib-${HTSLIBVER} && \
make && \
make install && \
mkdir /data
# set $PATH (honestly unnecessary here, lol) and locale settings for singularity compatibility
ENV PATH="$PATH" \
LC_ALL=C
# set working directory
WORKDIR /data
# testing
FROM app as test
ARG HTSLIBVER
WORKDIR /htslib-${HTSLIBVER}/test
RUN perl /htslib-${HTSLIBVER}/test/test.pl