Skip to content

Commit ca6227e

Browse files
authored
disable cgo and use alpine image (#14)
* disable cgo and use alpine image * copy everything to builder image to avoid maintenance overhead
1 parent 272acf7 commit ca6227e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Dockerfile

+5-8
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@ LABEL maintainer="SkynetLabs <[email protected]>"
33

44
WORKDIR /root
55

6-
COPY api api
7-
COPY clamav clamav
8-
COPY database database
9-
COPY scanner scanner
10-
COPY scanner scanner
11-
COPY go.mod go.sum main.go Makefile ./
6+
ENV CGO_ENABLED=0
7+
8+
COPY . .
129

1310
RUN go mod download && make release
1411

15-
FROM golang:1.17.7-alpine
12+
FROM alpine:3.15.0
1613
LABEL maintainer="SkynetLabs <[email protected]>"
1714

18-
COPY --from=builder /go/bin/malware-scanner /go/bin/malware-scanner
15+
COPY --from=builder /go/bin/malware-scanner /usr/bin/malware-scanner
1916

2017
ENTRYPOINT ["malware-scanner"]

0 commit comments

Comments
 (0)