krakend / krakend-ce

KrakenD Community Edition: High-performance, stateless, declarative, API Gateway written in Go.
https://www.krakend.io
Apache License 2.0
1.94k stars 453 forks source link

I have error in build krakend-ce with go mod download #899

Open rezaalimorady opened 2 months ago

rezaalimorady commented 2 months ago

using latest version of krakend-ce

FROM golang:1.22-bullseye AS builder

RUN apt-get update && \
    apt-get install -y ca-certificates git make && \
    update-ca-certificates

RUN git clone https://github.com/krakend/krakend-ce

RUN cd krakend-ce && \
    GOPROXY=https://goproxy.io go mod download && go mod tidy \
    make build

in this dockerfile i iave error in influxdata:

 => ERROR [builder 4/4] RUN cd krakend-ce &&     rm -f go.sum &&     GOPROXY=https://goproxy.io go mod download && go mod tidy     make build                                             155.3s
------                                                                                                                                                                                           
 > [builder 4/4] RUN cd krakend-ce &&     rm -f go.sum &&     GOPROXY=https://goproxy.io go mod download && go mod tidy     make build:                                                          
154.8 go: github.com/influxdata/influxdb@v1.11.5: verifying module: checksum mismatch                                                                                                            
154.8   downloaded: h1:no0nKPSzKkrmEbR6hAsw2JMye9Q0AIrlyR9sxj0M8ro=                                                                                                                              
154.8   sum.golang.org: h1:+em5VOl6lhAZubXj5o6SobCwvrRs3XDlBx/MUI4schI=                                                                                                                          
154.8 
154.8 SECURITY ERROR
154.8 This download does NOT match the one reported by the checksum server.
154.8 The bits may have been replaced on the origin server, or an attacker may
154.8 have intercepted the download attempt.
154.8 
154.8 For more information, see 'go help module-auth'.
------
Dockerfile.build:16
taik0 commented 2 months ago

Your logfile shows that you are removing the go.sum (not in the Dockerfile). It should work if you don't remove the go.sum.