-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile
27 lines (19 loc) · 708 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
FROM golang:alpine AS build-env
LABEL maintainer "Alexander Makhinov <[email protected]>" \
repository="https://github.com/0xrawsec/golang-evtx"
COPY . /go/src/github.com/0xrawsec/golang-evtx
RUN apk add --no-cache git mercurial \
&& cd /go/src/github.com/0xrawsec/golang-evtx/tools/evtxdump \
&& go get -t . \
&& CGO_ENABLED=0 go build -ldflags="-s -w" \
-a \
-installsuffix static \
-o /evtxdump
RUN adduser -D app
FROM scratch
COPY --from=build-env /evtxdump /app/evtxdump
COPY --from=build-env /etc/passwd /etc/passwd
USER app
VOLUME /app/data
WORKDIR /app/data
ENTRYPOINT ["../evtxdump"]