mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
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.
This commit is contained in:
parent
abe6d9da13
commit
8e5ef5503d
@ -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.
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user