Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (dockerfile): Split goose installations to different arches

Rostislav Duginf24b3219bc01
diff --git a/Dockerfile b/Dockerfile
index adb6a495..8a3da542 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -28,11 +28,15 @@ FROM --platform=$BUILDPLATFORM golang:1.23.3 AS backend-build
ARG TARGETOS
ARG TARGETARCH
-# Install Go public tools needed in runtime. Use `go install` for goose so the
+# Install Go public tools needed in runtime. Use `go build` for goose so the
# binary is compiled for the target architecture instead of downloading a
# prebuilt binary which may have the wrong architecture (causes exec format
# errors on ARM).
-RUN GOBIN=/usr/local/bin GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64} go install github.com/pressly/goose/v3/cmd/[email protected]
+RUN git clone --depth 1 --branch v3.24.3 https://github.com/pressly/goose.git /tmp/goose && \
+ cd /tmp/goose/cmd/goose && \
+ GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64} \
+ go build -o /usr/local/bin/goose . && \
+ rm -rf /tmp/goose
RUN go install github.com/swaggo/swag/cmd/[email protected]
# Set working directory