devtron
devtron copied to clipboard
Bug: Docker image fails to build
📜 Description
Creating docker image from source code (on local machine with docker-desktop) is failing with error:
=> ERROR [build-env 8/8] RUN GOOS=linux make build-all 1.7s
------
> [build-env 8/8] RUN GOOS=linux make build-all:
#18 0.237 rm -f devtron
#18 0.242 wire
#18 1.616 wire: go [list -e -json -compiled=true -test=false -export=false -deps=true -find=false -tags=wireinject -- .]: exit status 1: go build github.com/microsoft/azure-devops-go-api/azuredevops/git: no Go files in /go/src/github.com/devtron-labs/devtron/vendor/github.com/microsoft/azure-devops-go-api/azuredevops/git
#18 1.616 go build github.com/microsoft/azure-devops-go-api/azuredevops: no Go files in /go/src/github.com/devtron-labs/devtron/vendor/github.com/microsoft/azure-devops-go-api/azuredevops
#18 1.616
#18 1.616 wire: generate failed
#18 1.617 make: *** [Makefile:30: wire] Error 1
------
👟 Reproduction steps
1. clone repo
2. docker build .
👍 Expected behavior
docker image created
👎 Actual Behavior
Building image fails with error
☸ Kubernetes version
N/A
Cloud provider
N/A
🌍 Browser
Chrome
🧱 Your Environment
Windows 11, Mac OS, Docker version 20.10.22
✅ Proposed Solution
No response
👀 Have you spent some time to check if this issue has been raised before?
- [X] I checked and didn't find any similar issue
🏢 Have you read the Code of Conduct?
- [X] I have read the Code of Conduct
AB#3249
I got a similar error:
> git log --pretty=format:'%h' -n 1
3af467ab4
=> ERROR [build-env 8/8] RUN GOOS=linux make build-all 7.5s
------
> [build-env 8/8] RUN GOOS=linux make build-all:
0.144 rm -rf devtron
0.157 wire
6.843 wire: github.com/devtron-labs/devtron: wrote /go/src/github.com/devtron-labs/devtron/wire_gen.go
6.935 GOOS=linux go build -o devtron \
6.935 -ldflags="-X 'github.com/devtron-labs/devtron/util.GitCommit=3af467ab4' \
6.935 -X 'github.com/devtron-labs/devtron/util.BuildTime=2024-09-26T02:06:55Z' \
6.935 -X 'github.com/devtron-labs/devtron/util.ServerMode=FULL'"
7.354 pkg/deployment/gitOps/git/GitServiceAzure.go:27:2: cannot find module providing package github.com/microsoft/azure-devops-go-api/azuredevops: import lookup disabled by -mod=vendor
7.354 (Go version in go.mod is at least 1.14 and vendor directory exists.)
7.354 pkg/deployment/gitOps/git/GitServiceAzure.go:28:2: cannot find module providing package github.com/microsoft/azure-devops-go-api/azuredevops/git: import lookup disabled by -mod=vendor
7.354 (Go version in go.mod is at least 1.14 and vendor directory exists.)
7.359 make: *** [Makefile:25: build] Error 1
------