Skip to content

Commit

Permalink
disable cgo and use alpine image (#14)
Browse files Browse the repository at this point in the history
* disable cgo and use alpine image

* copy everything to builder image to avoid maintenance overhead
  • Loading branch information
kwypchlo authored Feb 25, 2022
1 parent 272acf7 commit ca6227e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@ LABEL maintainer="SkynetLabs <[email protected]>"

WORKDIR /root

COPY api api
COPY clamav clamav
COPY database database
COPY scanner scanner
COPY scanner scanner
COPY go.mod go.sum main.go Makefile ./
ENV CGO_ENABLED=0

COPY . .

RUN go mod download && make release

FROM golang:1.17.7-alpine
FROM alpine:3.15.0
LABEL maintainer="SkynetLabs <[email protected]>"

COPY --from=builder /go/bin/malware-scanner /go/bin/malware-scanner
COPY --from=builder /go/bin/malware-scanner /usr/bin/malware-scanner

ENTRYPOINT ["malware-scanner"]

0 comments on commit ca6227e

Please sign in to comment.