Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Try this to fix the build? (More like the original)

Matthew Kilgorecb9631c99936
diff --git a/Dockerfile b/Dockerfile
index 6ae91b77..44deca3c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -56,11 +56,11 @@ COPY --from=frontend-builder /app/.output/public ./app/api/static/public
# Use cache for Go build artifacts
RUN --mount=type=cache,target=/root/.cache/go-build \
if [ "$TARGETARCH" = "arm" ] || [ "$TARGETARCH" = "riscv64" ]; \
- then CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
+ then echo "nodynamic" $TARGETOS $TARGETARCH; CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
-ldflags "-s -w -X main.commit=$COMMIT -X main.buildTime=$BUILD_TIME -X main.version=$VERSION" \
-tags nodynamic -o /go/bin/api -v ./app/api/*.go; \
else \
- CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
+ echo $TARGETOS $TARGETARCH; CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
-ldflags "-s -w -X main.commit=$COMMIT -X main.buildTime=$BUILD_TIME -X main.version=$VERSION" \
-o /go/bin/api -v ./app/api/*.go; \
fi
diff --git a/Dockerfile.rootless b/Dockerfile.rootless
index bb5af88f..ae09f407 100644
--- a/Dockerfile.rootless
+++ b/Dockerfile.rootless
@@ -53,11 +53,11 @@ COPY --from=frontend-builder /app/.output/public ./app/api/static/public
# Use cache for Go build artifacts
RUN --mount=type=cache,target=/root/.cache/go-build \
if [ "$TARGETARCH" = "arm" ] || [ "$TARGETARCH" = "riscv64" ]; \
- then CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
+ then CGO_ENABLED=0 GOOS=linux go build \
-ldflags "-s -w -X main.commit=$COMMIT -X main.buildTime=$BUILD_TIME -X main.version=$VERSION" \
-tags nodynamic -o /go/bin/api -v ./app/api/*.go; \
else \
- CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
+ CGO_ENABLED=0 GOOS=linux go build \
-ldflags "-s -w -X main.commit=$COMMIT -X main.buildTime=$BUILD_TIME -X main.version=$VERSION" \
-o /go/bin/api -v ./app/api/*.go; \
fi