Enable CGO

This commit is contained in:
itspooya 2023-05-08 06:09:26 +03:30 committed by Ho3ein
parent 8011d0b6c6
commit 350743fea3

View file

@ -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 \
GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o xui-release -v main.go; \
TARGETARCH GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o xui-release -v main.go; \
elif [ "$TARGETARCH" = "amd64" ]; then \
GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go; \
TARGETARCH GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go; \
fi
# Start a new stage using the base image