From 1aee0cc4093bebe49da34ea0a5b8967cf8c04e26 Mon Sep 17 00:00:00 2001 From: Florian Eggenberger Date: Fri, 3 Sep 2021 09:32:29 +0200 Subject: [PATCH] Fix go build >= 1.16 Go build changed in 1.1.6. Modules are no on by default. This did break the build. Adding the environment variable GO111MODULE=auto will fix this. For details see: https://go.dev/blog/go116-module-changes --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1fb87b6..8b819b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,7 @@ RUN freshclam --quiet --no-dns # Build go package ADD . /go/src/clamav-rest/ +ENV GO111MODULE=auto RUN go get github.com/dutchcoders/go-clamd RUN go get github.com/prometheus/client_golang/prometheus/promhttp ADD ./server.* /etc/ssl/clamav-rest/