Fix issues with building functions locally
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