-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
35 lines (30 loc) · 982 Bytes
/
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
FROM malice/alpine
LABEL maintainer "https://github.com/blacktop"
LABEL malice.plugin.repository = "https://github.com/malice-plugins/totalhash.git"
LABEL malice.plugin.category="intel"
LABEL malice.plugin.mime="hash"
LABEL malice.plugin.docker.engine="*"
COPY . /go/src/github.com/malice-plugins/totalhash
RUN apk --update add --no-cache ca-certificates
RUN apk --update add --no-cache -t .build-deps \
build-base \
mercurial \
musl-dev \
openssl \
bash \
wget \
git \
gcc \
go \
&& echo "===> Building totalhash Go binary..." \
&& cd /go/src/github.com/malice-plugins/totalhash \
&& export GOPATH=/go \
&& go version \
&& go get -v \
&& CGO_ENABLED=0 \
&& go build -ldflags "-X main.Version=v$(cat VERSION) -X main.BuildTime=$(date -u +%Y%m%d)" -o /bin/totalhash \
&& rm -rf /go /usr/local/go /usr/lib/go /tmp/* \
&& apk del --purge .build-deps
WORKDIR /malware
ENTRYPOINT ["su-exec","malice","/sbin/tini","--","totalhash"]
CMD ["--help"]