-
Notifications
You must be signed in to change notification settings - Fork 10
/
bedtools.Dockerfile
52 lines (43 loc) · 1.34 KB
/
bedtools.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
ARG IMAGE
FROM "${IMAGE}" as bedtools_builder
ARG BEDTOOLS_VERSION
ARG BEDTOOLS_URL
ARG BEDTOOLS_PREFIX_ARG
ENV BEDTOOLS_PREFIX="${BEDTOOLS_PREFIX_ARG}"
WORKDIR /tmp
RUN set -eu \
&& DEBIAN_FRONTEND=noninteractive \
&& . /build/base.sh \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
libbz2-dev \
liblzma-dev \
python \
wget \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates \
&& wget -O bedtools.tar.gz "${BEDTOOLS_URL}" \
&& tar zxf bedtools.tar.gz \
&& cd bedtools*/ \
&& make \
&& make install prefix="${BEDTOOLS_PREFIX}" \
&& add_runtime_dep zlib1g libbz2-1.0 lzma
# CA cert stuff sometime required for git clone https
FROM "${IMAGE}"
ARG BEDTOOLS_VERSION
ARG BEDTOOLS_PREFIX_ARG
ENV BEDTOOLS_PREFIX="${BEDTOOLS_PREFIX_ARG}"
LABEL bedtools.version="${BEDTOOLS_VERSION}"
ENV PATH "${BEDTOOLS_PREFIX}/bin:${PATH}"
COPY --from=bedtools_builder "${BEDTOOLS_PREFIX}" "${BEDTOOLS_PREFIX}"
COPY --from=bedtools_builder "${APT_REQUIREMENTS_FILE}" /build/apt/bedtools.txt
RUN set -eu \
&& DEBIAN_FRONTEND=noninteractive \
&& . /build/base.sh \
&& apt-get update \
&& apt_install_from_file /build/apt/*.txt \
&& rm -rf /var/lib/apt/lists/* \
&& cat /build/apt/*.txt >> "${APT_REQUIREMENTS_FILE}"