From 94b22a9679c42d29fe3264b529977687163c3e29 Mon Sep 17 00:00:00 2001 From: DarthSim Date: Wed, 13 Jul 2022 10:40:24 +0600 Subject: [PATCH] Fix Docker build --- docker/Dockerfile | 3 ++- docker/{go.sh => fix-go.sh} | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) rename docker/{go.sh => fix-go.sh} (96%) diff --git a/docker/Dockerfile b/docker/Dockerfile index 255ec521..b1294e1d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,7 +6,8 @@ ARG BUILDPLATFORM ARG TARGETPLATFORM COPY . . -RUN docker/go.sh build -v -ldflags "-s -w" -o /usr/local/bin/imgproxy +RUN docker/fix-go.sh +RUN go build -v -ldflags "-s -w" -o /usr/local/bin/imgproxy # ================================================================================================== # Final image diff --git a/docker/go.sh b/docker/fix-go.sh similarity index 96% rename from docker/go.sh rename to docker/fix-go.sh index 5fc53cdd..94a47fcb 100755 --- a/docker/go.sh +++ b/docker/fix-go.sh @@ -11,7 +11,7 @@ if [[ $BUILDPLATFORM != $TARGETPLATFORM ]]; then ;; arm64 | "arm64/v8" | "linux/arm64" | "linux/arm64/v8") - BUILDPLATFORM="arm64" + BUILD_ARCH="arm64" ;; *) @@ -48,5 +48,3 @@ if [[ $BUILDPLATFORM != $TARGETPLATFORM ]]; then export GOOS=linux export GOARCH=$TARGET_ARCH fi - -go $@