From ddfce52939b17c9ef8e17bce7f834a56952dd4f4 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Sun, 21 Jun 2020 21:52:35 +1000 Subject: [PATCH] [MISC] Strip debugging information from compiled binaries (#1141) --- Dockerfile | 2 +- Dockerfile.arm32v7 | 2 +- Dockerfile.arm64v8 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3dd5b73e..f9bececb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN echo "Write tag ${BUILD_TAG} and commit ${BUILD_COMMIT} in binary." && \ # CGO_ENABLED=1 is mandatory for building go-sqlite3 RUN cd cmd/authelia && \ -GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -tags netgo -ldflags '-w -linkmode external -extldflags -static' -trimpath -o authelia +GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -tags netgo -ldflags '-s -w -linkmode external -extldflags -static' -trimpath -o authelia # =================================== # ===== Authelia official image ===== diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 25c2ddea..1f0c6271 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -47,7 +47,7 @@ RUN echo "Write tag ${BUILD_TAG} and commit ${BUILD_COMMIT} in binary." && \ # CGO_ENABLED=1 is mandatory for building go-sqlite3 RUN cd cmd/authelia && \ -GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-musleabihf-gcc go build -tags netgo -ldflags '-w -linkmode external -extldflags -static' -trimpath -o authelia +GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-musleabihf-gcc go build -tags netgo -ldflags '-s -w -linkmode external -extldflags -static' -trimpath -o authelia # =================================== # ===== Authelia official image ===== diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index a42a95be..a39aca7a 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -47,7 +47,7 @@ RUN echo "Write tag ${BUILD_TAG} and commit ${BUILD_COMMIT} in binary." && \ # CGO_ENABLED=1 is mandatory for building go-sqlite3 RUN cd cmd/authelia && \ -GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-musl-gcc go build -tags netgo -ldflags '-w -linkmode external -extldflags -static' -trimpath -o authelia +GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-musl-gcc go build -tags netgo -ldflags '-s -w -linkmode external -extldflags -static' -trimpath -o authelia # =================================== # ===== Authelia official image =====