diff --git a/Dockerfile.migrate b/Dockerfile.migrate index f51f017..f6a2b1b 100644 --- a/Dockerfile.migrate +++ b/Dockerfile.migrate @@ -2,7 +2,9 @@ # This Dockerfile expects a PRE-BUILT binary from GoReleaser (no compilation) # GoReleaser injects the platform-specific binary automatically -FROM alpine:latest +FROM --platform=$TARGETPLATFORM alpine:latest + +ARG TARGETARCH # Install runtime dependencies (including CGO/SQLite dependencies) RUN apk add --no-cache \ @@ -20,7 +22,8 @@ RUN addgroup -g 1000 gohoarder && \ # Copy pre-built binary from GoReleaser # GoReleaser will automatically inject the correct binary for the target platform -COPY migrate /usr/local/bin/migrate +# In split/merge mode, binaries are in linux/${TARGETARCH}/ subdirectories +COPY linux/${TARGETARCH}/migrate /usr/local/bin/migrate RUN chmod +x /usr/local/bin/migrate # Copy migration SQL files diff --git a/Dockerfile.scanner b/Dockerfile.scanner index 196e696..0d8654a 100644 --- a/Dockerfile.scanner +++ b/Dockerfile.scanner @@ -2,7 +2,9 @@ # This Dockerfile expects a PRE-BUILT binary from GoReleaser (no compilation) # GoReleaser injects the platform-specific binary automatically -FROM alpine:latest +FROM --platform=$TARGETPLATFORM alpine:latest + +ARG TARGETARCH # Install scanning tools and runtime dependencies (including CGO/SQLite dependencies) RUN apk add --no-cache \ @@ -41,7 +43,8 @@ RUN mkdir -p /var/cache/gohoarder \ # Copy pre-built binary from GoReleaser # GoReleaser will automatically inject the correct binary for the target platform -COPY gohoarder /usr/local/bin/gohoarder +# In split/merge mode, binaries are in linux/${TARGETARCH}/ subdirectories +COPY linux/${TARGETARCH}/gohoarder /usr/local/bin/gohoarder RUN chmod +x /usr/local/bin/gohoarder # Copy example config diff --git a/Dockerfile.server b/Dockerfile.server index d2a941a..ae9fcb3 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -2,7 +2,9 @@ # This Dockerfile expects a PRE-BUILT binary from GoReleaser (no compilation) # GoReleaser injects the platform-specific binary automatically -FROM alpine:latest +FROM --platform=$TARGETPLATFORM alpine:latest + +ARG TARGETARCH # Install runtime dependencies (CGO/SQLite requires these) RUN apk add --no-cache \ @@ -28,7 +30,8 @@ RUN mkdir -p /var/cache/gohoarder \ # Copy pre-built binary from GoReleaser # GoReleaser will automatically inject the correct binary for the target platform -COPY gohoarder /usr/local/bin/gohoarder +# In split/merge mode, binaries are in linux/${TARGETARCH}/ subdirectories +COPY linux/${TARGETARCH}/gohoarder /usr/local/bin/gohoarder RUN chmod +x /usr/local/bin/gohoarder # Copy example config