Getting error while building docker image

vendor/ undefined: configutil.ParseBoolEnv
vendor/ undefined: configutil.ParseDurationEnv

Im getting this error while building docker image but the ParseBoolEnv and ParseDurationEnv function is in the mentioned path inside the vendor directory

Hi @Hariprasanth_R, welcome to the forum. imports "" (see apm-agent-go/transport/http.go at 41de5f09b4be67a9781a9e889a9c249a4c35176d · elastic/apm-agent-go · GitHub).

Does the path exist in your vendor folder?

Does running go mod tidy improve the situation?

Background: I got curious, so I tested this locally. I created a go.mod and main.go (see below), then I ran go mod tidy to download all dependencies, then I ran go mod vendor to get all the dependencies into the vendor directory.

At my end, I see inside my vendor directory, and go build succeeds.

module vendoring

go 1.20

require v1.15.0

require v0.8.1 // indirect
package main

import (


func main() {
	t, err := transport.NewHTTPTransport()
	if err != nil {

Thanks for the reply.
But I to see inside my vendor directory and go mod tidy doesn’t seem to give any improvement

This is strange. Is there something special about your build environment? Some settings, restrictions, etc. that would not exist on a typical machine?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.