[ci] Add hardening to go binary build

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-02-26 14:59:02 +01:00
parent ee92cbbb03
commit 438bedc99c
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -17,8 +17,11 @@ RUN set -ex \
npm \ npm \
&& make frontend \ && make frontend \
&& go install \ && go install \
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \ -trimpath \
-mod=readonly -buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-X main.version=$(git describe --tags --always || echo dev)"
FROM alpine:latest FROM alpine:latest