-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdecipher.Dockerfile
57 lines (47 loc) · 1.54 KB
/
decipher.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
ARG IMAGE="darcyabjones/base"
FROM "${IMAGE}" as decipher_builder
ARG DECIPHER_VERSION
ARG DECIPHER_URL
ARG DECIPHER_PREFIX_ARG
ENV DECIPHER_PREFIX="${DECIPHER_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 \
wget \
&& add_runtime_dep \
r-base \
r-cran-ape \
r-cran-phangorn \
r-cran-rsqlite \
r-bioc-biostrings \
r-cran-optparse \
r-cran-magrittr \
&& apt_install_from_file "${APT_REQUIREMENTS_FILE}" \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates \
&& wget -O "decipher.tar.gz" "${DECIPHER_URL}" \
&& tar -zxf decipher.tar.gz \
&& cd DECIPHER*/ \
&& R CMD build --no-build-vignettes --no-manual . \
&& mkdir -p "${DECIPHER_PREFIX}" \
&& R CMD INSTALL --build --library="${DECIPHER_PREFIX}" ./DECIPHER_*.tar.gz
FROM "${IMAGE}"
ARG DECIPHER_VERSION
ARG DECIPHER_PREFIX_ARG
ENV DECIPHER_PREFIX="${DECIPHER_PREFIX_ARG}"
LABEL decipher.version="${DECIPHER_VERSION}"
ENV R_LIBS_USER="${DECIPHER_PREFIX}:${R_LIBS_USER:-}"
COPY --from=decipher_builder "${DECIPHER_PREFIX}" "${DECIPHER_PREFIX}"
COPY --from=decipher_builder "${APT_REQUIREMENTS_FILE}" /build/apt/decipher.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}"