Skip to content

Fix issues with building functions locally

Alishan Ladhani requested to merge fix-docker-dep-version into master

When installing gitlabktl locally using go get, the following error occurs:

go: finding github.com/docker/docker v0.0.0-00010101000000-000000000000
go: github.com/docker/docker@v0.0.0-00010101000000-000000000000: unknown revision 000000000000
go: error loading module requirements

This is because go get does not follow replace directives in go.mod. The solution is to depend on docker/docker directly, with the consequence that we cannot depend on a particular version, since the repo has no recent tags.

Another issue with local Docker builds is that the API version could be mismatched. An option is now passed when instantiating the Docker client to negotiate the API version and fix this issue.

Edited by Alishan Ladhani

Merge request reports