diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0812a3ed9..5d42db9fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ on: env: SIGN_PIPE_VER: "v0.0.4" - GORELEASER_VER: "v1.6.3" + GORELEASER_VER: "v1.14.1" jobs: release: @@ -57,7 +57,8 @@ jobs: with: username: netbirdio password: ${{ secrets.DOCKER_TOKEN }} - + - name: Install OS build dependencies + run: sudo apt update && sudo apt install -y -q gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 074a5dc55..06b352348 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -32,7 +32,13 @@ builds: - id: netbird-mgmt dir: management - env: [CGO_ENABLED=0] + env: + - CGO_ENABLED=1 + - >- + {{- if eq .Runtime.Goos "linux" }} + {{- if eq .Arch "arm64"}}CC=aarch64-linux-gnu-gcc{{- end }} + {{- if eq .Arch "arm"}}CC=arm-linux-gnueabihf-gcc{{- end }} + {{- end }} binary: netbird-mgmt goos: - linux diff --git a/management/Dockerfile.debug b/management/Dockerfile.debug index bf71048b8..f4be366a8 100644 --- a/management/Dockerfile.debug +++ b/management/Dockerfile.debug @@ -1,4 +1,5 @@ -FROM gcr.io/distroless/base:debug +FROM ubuntu:22.04 +RUN apt update && apt install -y ca-certificates && rm -fr /var/cache/apt ENTRYPOINT [ "/go/bin/netbird-mgmt","management","--log-level","debug"] CMD ["--log-file", "console"] COPY netbird-mgmt /go/bin/netbird-mgmt