forked from isimluk/vulnapp
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 986 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 986 Bytes
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
FROM golang:alpine as builder
RUN apk add --no-cache git
ADD . $GOPATH/src/github.com/crowdstrike/shell2http
WORKDIR $GOPATH/src/github.com/crowdstrike/shell2http
ENV CGO_ENABLED=0
ENV GOARCH=$TARGETARCH
ENV GOOS=linux
RUN go build -v -trimpath -ldflags="-w -s -X 'main.version=$(git describe --abbrev=0 --tags | sed s/v//)'" -o /go/bin/shell2http .
RUN go build -v -trimpath -o /go/bin/gendetections ./scripts/gendetections
# Generate detections.json from the base image's scripts
FROM quay.io/crowdstrike/detection-container AS detector
COPY --from=builder /go/bin/gendetections /gendetections
RUN /gendetections /home/eval/bin > /detections.json
# final image
FROM quay.io/crowdstrike/detection-container
LABEL org.opencontainers.image.source="https://github.com/CrowdStrike/vulnapp"
COPY --from=detector /detections.json /detections.json
COPY --from=builder /go/bin/shell2http /shell2http
COPY entrypoint.sh /
COPY images /images
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]