@cryptotaxi247 / kubo / commits / 8e5ef5503

fix(ci): docker build (#10914)

* fix(ci): pass -buildvcs=false to go list in Makefile Docker builds were failing because go list commands in mk/golang.mk didn't inherit GOFLAGS from the environment, causing empty package names when .git directory was incomplete. This issue always existed but was masked until recent changes in GitHub Actions runners or Docker golang image exposed it. * fix(ci): use modern ENV key=value format in Dockerfile Fixes Docker build deprecation warnings.

Marcin Rataj committed Aug 14, 2025 at 01:49 UTC 8e5ef5503d2ae7a17b7c716d56b0f5bbeb47e851
2 files changed +6 -6
Dockerfile
+4 -4
@@ -2,7 +2,7 @@ FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.24 AS builder
2
3 ARG TARGETOS TARGETARCH
4
5 -ENV SRC_DIR /kubo
5 +ENV SRC_DIR=/kubo
6
7 # Download packages first so they can be cached.
8 COPY go.mod go.sum $SRC_DIR/
@@ -47,7 +47,7 @@ RUN set -eux; \
47 FROM busybox:stable-glibc
48
49 # Get the ipfs binary, entrypoint script, and TLS CAs from the build container.
50 -ENV SRC_DIR /kubo
50 +ENV SRC_DIR=/kubo
51 COPY --from=utilities /usr/sbin/gosu /sbin/gosu
52 COPY --from=utilities /usr/bin/tini /sbin/tini
53 COPY --from=utilities /bin/fusermount /usr/local/bin/fusermount
@@ -74,7 +74,7 @@ EXPOSE 8080
74 EXPOSE 8081
75
76 # Create the fs-repo directory and switch to a non-privileged user.
77 -ENV IPFS_PATH /data/ipfs
77 +ENV IPFS_PATH=/data/ipfs
78 RUN mkdir -p $IPFS_PATH \
79 && adduser -D -h $IPFS_PATH -u 1000 -G users ipfs \
80 && chown ipfs:users $IPFS_PATH
@@ -93,7 +93,7 @@ RUN mkdir /container-init.d \
93 VOLUME $IPFS_PATH
94
95 # The default logging level
96 -ENV GOLOG_LOG_LEVEL ""
96 +ENV GOLOG_LOG_LEVEL=""
97
98 # This just makes sure that:
99 # 1. There's an fs-repo, and initializes one if there isn't.
mk/golang.mk
+2 -2
@@ -26,10 +26,10 @@ TEST_GO :=
26 TEST_GO_BUILD :=
27 CHECK_GO :=
28
29 -go-pkg-name=$(shell $(GOCC) list $(go-tags) github.com/ipfs/kubo/$(1))
29 +go-pkg-name=$(shell GOFLAGS=-buildvcs=false $(GOCC) list $(go-tags) github.com/ipfs/kubo/$(1))
30 go-main-name=$(notdir $(call go-pkg-name,$(1)))$(?exe)
31 go-curr-pkg-tgt=$(d)/$(call go-main-name,$(d))
32 -go-pkgs=$(shell $(GOCC) list github.com/ipfs/kubo/...)
32 +go-pkgs=$(shell GOFLAGS=-buildvcs=false $(GOCC) list github.com/ipfs/kubo/...)
33
34 go-tags=$(if $(GOTAGS), -tags="$(call join-with,$(space),$(GOTAGS))")
35 go-flags-with-tags=$(GOFLAGS)$(go-tags)