Skip to content

Modern Docker Management, Designed for Everyone

chore: fix builds for release

Kyle Mendell191ffc1bc0b7
diff --git a/docker/Dockerfile-agent b/docker/Dockerfile-agent
index 28e068ab2..280b4d16c 100644
--- a/docker/Dockerfile-agent
+++ b/docker/Dockerfile-agent
@@ -32,7 +32,6 @@ WORKDIR /app
RUN mkdir -p /app/data && chmod 755 /app/data
COPY --from=agent-builder /out/arcane-agent /usr/local/bin/arcane-agent
-COPY --from=agent-builder /out/docker-compose /usr/local/bin/docker-compose
COPY --chmod=755 ../scripts/docker/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
diff --git a/scripts/development/build-binaries.sh b/scripts/development/build-binaries.sh
index f0eb625c9..c2b5175ea 100755
--- a/scripts/development/build-binaries.sh
+++ b/scripts/development/build-binaries.sh
@@ -37,12 +37,17 @@ build_platform() {
local ext=""
local output_path=".bin/${BINARY_BASENAME}-${target}${ext}"
+ local cgo_enabled=0
+ if [ "$os" = "darwin" ]; then
+ cgo_enabled="${CGO_ENABLED_DARWIN_OVERRIDE:-1}"
+ fi
+
if [ -n "$arm_version" ]; then
- printf "Building %s (GOOS=%s GOARCH=%s GOARM=%s)%s ... " \
- "$output_path" "$os" "$arch" "$arm_version" "${BUILD_TAGS:+ tags=$BUILD_TAGS}"
+ printf "Building %s (GOOS=%s GOARCH=%s GOARM=%s CGO_ENABLED=%s)%s ... " \
+ "$output_path" "$os" "$arch" "$arm_version" "$cgo_enabled" "${BUILD_TAGS:+ tags=$BUILD_TAGS}"
else
- printf "Building %s (GOOS=%s GOARCH=%s)%s ... " \
- "$output_path" "$os" "$arch" "${BUILD_TAGS:+ tags=$BUILD_TAGS}"
+ printf "Building %s (GOOS=%s GOARCH=%s CGO_ENABLED=%s)%s ... " \
+ "$output_path" "$os" "$arch" "$cgo_enabled" "${BUILD_TAGS:+ tags=$BUILD_TAGS}"
fi
local build_flags=()
@@ -51,10 +56,10 @@ build_platform() {
fi
if [ -n "$arm_version" ]; then
- GOARM="$arm_version" CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" \
+ GOARM="$arm_version" CGO_ENABLED="$cgo_enabled" GOOS="$os" GOARCH="$arch" \
go build "${build_flags[@]}" -ldflags="$LDFLAGS" -trimpath -o "$output_path" ./cmd/main.go
else
- CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" \
+ CGO_ENABLED="$cgo_enabled" GOOS="$os" GOARCH="$arch" \
go build "${build_flags[@]}" -ldflags="$LDFLAGS" -trimpath -o "$output_path" ./cmd/main.go
fi