diff --git a/watchdog/Dockerfile b/watchdog/Dockerfile index 1fb53bb7d9d63447e87878f02685a77d98b515bf..e6facbbe64226b8f8642af94755e3084df701363 100644 --- a/watchdog/Dockerfile +++ b/watchdog/Dockerfile @@ -12,6 +12,7 @@ COPY types types RUN go test -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog . \ - && GOARM=6 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog-armhf . \ - && GOOS=windows CGO_ENABLED=0 go build -a -installsuffix cgo -o watchdog.exe . +# Stripping via -ldflags "-s -w" +RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o watchdog . \ + && GOARM=6 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o watchdog-armhf . \ + && GOOS=windows CGO_ENABLED=0 go build -a -ldflags "-s -w" -installsuffix cgo -o watchdog.exe .