-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
34 lines (29 loc) · 979 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
FROM malice/alpine
LABEL maintainer "https://github.com/blacktop"
LABEL malice.plugin.repository = "https://github.com/malice-plugins/shadow-server.git"
LABEL malice.plugin.category="intel"
LABEL malice.plugin.mime="hash"
LABEL malice.plugin.docker.engine="*"
COPY . /go/src/github.com/malice-plugins/shadow-server
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 info Go binary..." \
&& cd /go/src/github.com/malice-plugins/shadow-server \
&& export GOPATH=/go \
&& go version \
&& go get \
&& go build -ldflags "-s -w -X main.Version=v$(cat VERSION) -X main.BuildTime=$(date -u +%Y%m%d)" -o /bin/shadow-server \
&& rm -rf /go /usr/local/go /usr/lib/go /tmp/* \
&& apk del --purge .build-deps
WORKDIR /malware
ENTRYPOINT ["su-exec","malice","/sbin/tini","--","shadow-server"]
CMD ["--help"]