dev: workaround docker hub rate limiting
Created by: michaellzc
Part of https://github.com/sourcegraph/sourcegraph/issues/30758
Port https://github.com/sourcegraph/update-docker-tags/pull/3 in sg-cli
pardon my horrible go knowledge, feel free to let me know if there is a better way to implement this.
How to test
cd dev/sg
go build .
Go to deploy-sourcegraph
, and run (you can run 10 times in a row without getting rate limited)
/path/to/sg ops update-images base/.
The command will try to reuse your docker credentials store. You can verify it by inspecting the logs before and after docker logout
You should see files in base/
are getting updated as expected