diff --git a/Dockerfile b/Dockerfile index d2924f2b7..310f97a93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.24 AS builder ARG TARGETOS TARGETARCH -ENV SRC_DIR /kubo +ENV SRC_DIR=/kubo # Download packages first so they can be cached. COPY go.mod go.sum $SRC_DIR/ @@ -47,7 +47,7 @@ RUN set -eux; \ FROM busybox:stable-glibc # Get the ipfs binary, entrypoint script, and TLS CAs from the build container. -ENV SRC_DIR /kubo +ENV SRC_DIR=/kubo COPY --from=utilities /usr/sbin/gosu /sbin/gosu COPY --from=utilities /usr/bin/tini /sbin/tini COPY --from=utilities /bin/fusermount /usr/local/bin/fusermount @@ -74,7 +74,7 @@ EXPOSE 8080 EXPOSE 8081 # Create the fs-repo directory and switch to a non-privileged user. -ENV IPFS_PATH /data/ipfs +ENV IPFS_PATH=/data/ipfs RUN mkdir -p $IPFS_PATH \ && adduser -D -h $IPFS_PATH -u 1000 -G users ipfs \ && chown ipfs:users $IPFS_PATH @@ -93,7 +93,7 @@ RUN mkdir /container-init.d \ VOLUME $IPFS_PATH # The default logging level -ENV GOLOG_LOG_LEVEL "" +ENV GOLOG_LOG_LEVEL="" # This just makes sure that: # 1. There's an fs-repo, and initializes one if there isn't. diff --git a/mk/golang.mk b/mk/golang.mk index 3b32a65f9..ce765a294 100644 --- a/mk/golang.mk +++ b/mk/golang.mk @@ -26,10 +26,10 @@ TEST_GO := TEST_GO_BUILD := CHECK_GO := -go-pkg-name=$(shell $(GOCC) list $(go-tags) github.com/ipfs/kubo/$(1)) +go-pkg-name=$(shell GOFLAGS=-buildvcs=false $(GOCC) list $(go-tags) github.com/ipfs/kubo/$(1)) go-main-name=$(notdir $(call go-pkg-name,$(1)))$(?exe) go-curr-pkg-tgt=$(d)/$(call go-main-name,$(d)) -go-pkgs=$(shell $(GOCC) list github.com/ipfs/kubo/...) +go-pkgs=$(shell GOFLAGS=-buildvcs=false $(GOCC) list github.com/ipfs/kubo/...) go-tags=$(if $(GOTAGS), -tags="$(call join-with,$(space),$(GOTAGS))") go-flags-with-tags=$(GOFLAGS)$(go-tags)