mirror of
https://github.com/openfaas/faas.git
synced 2025-06-27 17:23:25 +00:00
Strip binaries to half of size
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
@ -12,6 +12,7 @@ COPY types types
|
|||||||
|
|
||||||
RUN go test
|
RUN go test
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog . \
|
# Stripping via -ldflags "-s -w"
|
||||||
&& GOARM=6 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o watchdog-armhf . \
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o watchdog . \
|
||||||
&& GOOS=windows CGO_ENABLED=0 go build -a -installsuffix cgo -o watchdog.exe .
|
&& 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 .
|
||||||
|
Reference in New Issue
Block a user