forked from darcyabjones/pante
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmitefinder.Dockerfile
48 lines (38 loc) · 1.3 KB
/
mitefinder.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
ARG IMAGE
FROM "${IMAGE}" as mitefinder_builder
ARG MITEFINDER_COMMIT
ARG MITEFINDER_REPO
ARG MITEFINDER_PREFIX_ARG
ENV MITEFINDER_PREFIX="${MITEFINDER_PREFIX_ARG}"
WORKDIR /tmp
RUN set -eu \
&& DEBIAN_FRONTEND=noninteractive \
&& . /build/base.sh \
&& apt-get update \
&& apt-get install -y \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/* \
&& git clone "${MITEFINDER_REPO}" . \
&& git checkout "${MITEFINDER_COMMIT}" \
&& make \
&& mkdir -p "${MITEFINDER_PREFIX}" \
&& mkdir -p "${MITEFINDER_PREFIX}/bin" \
&& mv miteFinder "${MITEFINDER_PREFIX}/bin" \
&& mv profile "${MITEFINDER_PREFIX}"
FROM "${IMAGE}"
ARG MITEFINDER_COMMIT
ARG MITEFINDER_PREFIX_ARG
ENV MITEFINDER_PREFIX="${MITEFINDER_PREFIX_ARG}"
ENV MITEFINDER_PROFILE="${MITEFINDER_PREFIX}/profile/pattern_scoring.txt"
ENV PATH="${MITEFINDER_PREFIX}/bin:${PATH}"
LABEL mitefinder.version = "${MITEFINDER_COMMIT}"
COPY --from=mitefinder_builder "${MITEFINDER_PREFIX}" "${MITEFINDER_PREFIX}"
COPY --from=mitefinder_builder "${APT_REQUIREMENTS_FILE}" /build/apt/mitefinder.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}"