[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 \
&& make frontend \
&& go install \
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
-mod=readonly
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-X main.version=$(git describe --tags --always || echo dev)"
FROM alpine:latest