diff --git a/Dockerfile b/Dockerfile index 8323e7c..b6188fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,9 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /snapshotter-local-collector ./cmd/main # Use a minimal base image FROM scratch +# Copy SSL certificates from the builder stage +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ + # Copy the binary from the builder stage COPY --from=builder /snapshotter-local-collector /snapshotter-local-collector diff --git a/cmd/main.go b/cmd/main.go index 9e8d008..d9b9d0a 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -12,7 +12,6 @@ import ( ) func main() { - var wg sync.WaitGroup helpers.InitLogger() config.LoadConfig() service.InitializeReportingService(config.SettingsObj.PowerloomReportingUrl, 5*time.Second) @@ -28,9 +27,9 @@ func main() { // Check both basic connection status and resource limits if service.SequencerHostConn.Network().Connectedness(service.SequencerId) != network.Connected || service.IsResourceLimitExceeded() { - + log.Warn("Connection issue or resource limit exceeded. Attempting atomic reset...") - + if err := service.AtomicConnectionReset(); err != nil { log.Errorf("Failed to perform atomic reset: %v", err) } else { @@ -40,7 +39,7 @@ func main() { } } }() - + var wg sync.WaitGroup wg.Add(1) go service.StartSubmissionServer(service.NewMsgServerImplV2()) wg.Wait()