mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-05 01:36:19 +00:00
Fixed build arm64
This commit is contained in:
parent
36cf7c0a8f
commit
d0dfc2d5b1
1 changed files with 5 additions and 2 deletions
|
@ -4,7 +4,8 @@
|
||||||
FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder
|
FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ENV CGO_ENABLED=1
|
ARG TARGETPLATFORM
|
||||||
|
ENV CGO_ENABLED=0
|
||||||
|
|
||||||
RUN apk --no-cache --update add \
|
RUN apk --no-cache --update add \
|
||||||
build-base \
|
build-base \
|
||||||
|
@ -14,7 +15,9 @@ RUN apk --no-cache --update add \
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN go build -o build/x-ui main.go
|
RUN GOOS="$(echo "${TARGETPLATFORM}" | cut -d/ -f1)" \
|
||||||
|
GOARCH="$(echo "${TARGETPLATFORM}" | cut -d/ -f2)" \
|
||||||
|
go build -o build/x-ui main.go
|
||||||
RUN ./DockerInit.sh "$TARGETARCH"
|
RUN ./DockerInit.sh "$TARGETARCH"
|
||||||
|
|
||||||
# ========================================================
|
# ========================================================
|
||||||
|
|
Loading…
Reference in a new issue