Repository: miniflux/v2 (language: go)

Issue:
package log/slog is not in GOROOT
    mcn@x270 [go] ~/projects/mcnesium/miniflux (main) git pull upstream main
    From github.com:miniflux/v2
     * branch              main       -> FETCH_HEAD
    Already up to date.
    
    mcn@x270 [go] ~/projects/mcnesium/miniflux (main) make docker-image
    docker build -t miniflux/miniflux:v2.0.49 -f packaging/docker/alpine/Dockerfile .
    Sending build context to Docker daemon  38.45MB
    Step 1/20 : FROM golang:alpine AS build
    […]
    Step 6/20 : RUN go build     -o miniflux     -ldflags="-s -w -X 'miniflux.app/v2/internal/version.Version=`git describe --tags --abbrev=0`' -X 'miniflux.app/v2/internal/version.Commit=`git rev-parse --short HEAD`' -X 'miniflux.app/v2/internal/version.BuildDate=`date +%FT%T%z`'"     main.go
     ---> Running in 24bcd9caea3f
    go: downloading golang.org/x/term v0.13.0
    […]
    go: downloading golang.org/x/text v0.13.0
    go: downloading github.com/golang/protobuf v1.5.3
    internal/cli/cleanup_tasks.go:7:2: package log/slog is not in GOROOT (/usr/local/go/src/log/slog)
    note: imported by a module that requires go 1.21
    The command '/bin/sh -c go build     -o miniflux     -ldflags="-s -w -X 'miniflux.app/v2/internal/version.Version=`git describe --tags --abbrev=0`' -X 'miniflux.app/v2/internal/version.Commit=`git rev-parse --short HEAD`' -X 'miniflux.app/v2/internal/version.BuildDate=`date +%FT%T%z`'"     main.go' returned a non-zero code: 1
    make: *** [Makefile:134: docker-image] Error 1
    
    



Discussion / hints:
You need at least Golang >= 1.21 to compile Miniflux. See https://go.dev/doc/go1.21#slog and https://miniflux.app/docs/development.html#requirements

Fix patch:
diff --git a/Makefile b/Makefile
index 1a4f4536f82..3f9cb6610dd 100644
--- a/Makefile
+++ b/Makefile
@@ -131,7 +131,7 @@ clean-integration-test:
 	@ psql -U postgres -c 'drop database if exists miniflux_test;'
 
 docker-image:
-	docker build -t $(DOCKER_IMAGE):$(VERSION) -f packaging/docker/alpine/Dockerfile .
+	docker build --pull -t $(DOCKER_IMAGE):$(VERSION) -f packaging/docker/alpine/Dockerfile .
 
 docker-image-distroless:
 	docker build -t $(DOCKER_IMAGE):$(VERSION) -f packaging/docker/distroless/Dockerfile .


Test patch: