-
Notifications
You must be signed in to change notification settings - Fork 321
/
Dockerfile
85 lines (69 loc) · 2.14 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
ARG VECTORSCAN_IMG_TAG=latest
ARG VECTORSCAN_IMAGE_REPOSITORY=deepfenceio
FROM $VECTORSCAN_IMAGE_REPOSITORY/deepfence_vectorscan_build:$VECTORSCAN_IMG_TAG AS vectorscan
FROM golang:1.23-alpine3.20 AS builder
MAINTAINER DeepFence
RUN apk update \
&& apk add --upgrade gcc musl-dev pkgconfig g++ make git
RUN apk add --no-cache \
git \
make \
build-base \
pkgconfig \
libpcap-dev \
libcap-dev \
openssl-dev \
file \
jansson-dev \
jansson-static \
bison \
tini \
su-exec
RUN apk add --no-cache -t .build-deps py-setuptools \
openssl-libs-static \
jansson-dev \
build-base \
libc-dev \
file-dev \
automake \
autoconf \
libtool \
libcrypto3 \
flex \
git \
libmagic-static \
linux-headers
RUN cd /root && wget https://github.com/VirusTotal/yara/archive/refs/tags/v4.3.2.tar.gz \
&& tar -zxf v4.3.2.tar.gz \
&& cd yara-4.3.2 \
&& ./bootstrap.sh \
&& ./configure --prefix=/usr/local/yara --disable-dotnet --enable-magic --enable-cuckoo --disable-shared --enable-static\
&& make \
&& make install \
&& cd /usr/local/ \
&& tar -czf yara.tar.gz yara
WORKDIR /home/deepfence/src/SecretScanner
COPY . .
RUN make clean && make all
FROM alpine:3.20
MAINTAINER DeepFence
LABEL deepfence.role=system
ENV MGMT_CONSOLE_URL=deepfence-internal-router \
MGMT_CONSOLE_PORT=443
ARG TARGETARCH
RUN apk add --no-cache --upgrade tar libstdc++ libgcc docker skopeo bash podman
RUN <<EOF
set -eux
apk update && apk add --no-cache --upgrade curl
NERDCTL_VERSION=1.7.7
curl -fsSLO https://github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-${NERDCTL_VERSION}-linux-${TARGETARCH}.tar.gz
tar Cxzvvf /usr/local/bin nerdctl-${NERDCTL_VERSION}-linux-${TARGETARCH}.tar.gz
rm nerdctl-${NERDCTL_VERSION}-linux-${TARGETARCH}.tar.gz
apk del curl
EOF
WORKDIR /home/deepfence/usr
COPY --from=builder /home/deepfence/src/SecretScanner/SecretScanner .
COPY --from=builder /home/deepfence/src/SecretScanner/config.yaml .
WORKDIR /home/deepfence/output
ENTRYPOINT ["/home/deepfence/usr/SecretScanner", "-config-path", "/home/deepfence/usr"]
CMD ["-h"]