From 842be3a071ee9362e3cf7bf7e9e14a1d590d650e Mon Sep 17 00:00:00 2001 From: Yurii Vlasov Date: Fri, 8 Dec 2023 15:00:57 +0200 Subject: [PATCH] Nothing special. Just regular commit. --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 498577e1..d011b20e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,10 @@ FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder WORKDIR /app ARG TARGETARCH -ARG TARGETPLATFORM +ARG TARGETOS ENV CGO_ENABLED=0 +ENV GOOS=$TARGETOS +ENV GOARCH=$TARGETARCH RUN apk --no-cache --update add \ build-base \ @@ -15,9 +17,7 @@ RUN apk --no-cache --update add \ COPY . . -RUN GOOS="$(echo "${TARGETPLATFORM}" | cut -d/ -f1)" \ - GOARCH="$(echo "${TARGETPLATFORM}" | cut -d/ -f2)" \ - go build -o build/x-ui main.go +RUN go build -o build/x-ui main.go RUN ./DockerInit.sh "$TARGETARCH" # ========================================================