diff --git a/Dockerfile-desktop-linux b/Dockerfile-desktop-linux index 21832aa839..e646d6fae8 100644 --- a/Dockerfile-desktop-linux +++ b/Dockerfile-desktop-linux @@ -1,6 +1,8 @@ FROM --platform=linux/amd64 golang:1.25.5-bookworm@sha256:5117d68695f57faa6c2b3a49a6f3187ec1f66c75d5b080e4360bfe4c1ada398c LABEL maintainer="Fleet Developers" +RUN apt-get update && apt-get install -y musl-tools && rm -rf /var/lib/apt/lists/* + RUN mkdir -p /usr/src/fleet RUN mkdir -p /output diff --git a/Makefile b/Makefile index d8eadcdd2e..fb0779192a 100644 --- a/Makefile +++ b/Makefile @@ -763,7 +763,7 @@ desktop-linux: docker build -f Dockerfile-desktop-linux -t desktop-linux-builder . docker run --rm -v $(shell pwd):/output desktop-linux-builder /bin/bash -c "\ mkdir -p /output/fleet-desktop && \ - go build -o /output/fleet-desktop/fleet-desktop -ldflags "-X=main.version=$(FLEET_DESKTOP_VERSION)" /usr/src/fleet/orbit/cmd/desktop && \ + CGO_ENABLED=1 CC=musl-gcc go build -o /output/fleet-desktop/fleet-desktop -ldflags \"-linkmode external -extldflags \\\"-static\\\" -X=main.version=$(FLEET_DESKTOP_VERSION)\" /usr/src/fleet/orbit/cmd/desktop && \ cd /output && \ tar czf desktop.tar.gz fleet-desktop && \ rm -r fleet-desktop" diff --git a/orbit/changes/35413-fleet-desktop-glibc-incompatibility-fix b/orbit/changes/35413-fleet-desktop-glibc-incompatibility-fix new file mode 100644 index 0000000000..21caac674e --- /dev/null +++ b/orbit/changes/35413-fleet-desktop-glibc-incompatibility-fix @@ -0,0 +1 @@ +- Added `musl-tools` to fleet-desktop build process to fix GLIBC incompatibility that caused orbit agent to fail when updating fleet-desktop on Ubuntu 20.04. \ No newline at end of file