From ed02b17e5a2b0f35b85a09989aed491ddca0aaa6 Mon Sep 17 00:00:00 2001 From: itspooya Date: Mon, 8 May 2023 06:11:44 +0330 Subject: [PATCH] Enable CGO --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b82a0f92..6bcfaedc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,9 +16,9 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then apt update && apt install gcc-aarch64-l # Build the X-ui binary RUN if [ "$TARGETARCH" = "arm64" ]; then \ - TARGETARCH GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o xui-release -v main.go; \ + CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o xui-release -v main.go; \ elif [ "$TARGETARCH" = "amd64" ]; then \ - TARGETARCH GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go; \ + CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go; \ fi # Start a new stage using the base image