Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoritspooya <fallenangel201190@yahoo.com>2023-05-08 05:27:43 +0300
committerHo3ein <ho3ein.sanaei@gmail.com>2023-05-08 09:34:47 +0300
commit9e5d7ac1d02308424ebd76c8cce89dcfada3b0ba (patch)
tree913415d228158b9af8c8a41aec66e41618bc4738 /Dockerfile
parente01fb9b605d048082b8ee814a80ba603a0d57404 (diff)
Fixed Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index cc08c571..aa5968ea 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
# Use the official Golang image as the base image
FROM --platform=$BUILDPLATFORM golang:1.20 as builder
-
+ARG TARGETOS TARGETARCH
# Set up the working directory
WORKDIR /app
@@ -13,12 +13,12 @@ COPY . .
ARG TARGETPARCH
-RUN if [ "$TARGETPARCH" = "arm64" ]; then apt update && apt install gcc-aarch64-linux-gnu -y; fi
+RUN if [ "$TARGETARCH" = "arm64" ]; then apt update && apt install gcc-aarch64-linux-gnu -y; fi
# Build the X-ui binary
-RUN if [ "$TARGETPARCH" = "arm64" ]; then \
+RUN if [ "$TARGETARCH" = "arm64" ]; then \
GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o xui-release -v main.go; \
- elif [ "$TARGETPARCH" = "amd64" ]; then \
+ elif [ "$TARGETARCH" = "amd64" ]; then \
GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go; \
fi