douzhuoxia0587 2019-01-30 23:43
浏览 148
已采纳

Go docker SDK是从哪里获取的?

I can execute:

go get github.com/docker/docker/client

(from here) and see the source in my $GOPATH/src/github.com/docker/docker/client.

But there is no such repository https://github.com/docker/docker/client.

Where does go actually get the source from? Can someone point me to the url?

  • 写回答

1条回答 默认 最新

  • douzuqin3467 2019-01-31 00:35
    关注

    Q: Where does the go docker sdk gets fetched from?

    A: As mentioned. https://github.com/moby/moby

    I had trouble working out the answer like you do as well. But this is how I derived it in the end.

    Like what you you did.

    First, running go get github.com/docker/docker/client. This command git cloned a docker/docker project into my $GOPATH/github.com directory.

    Then I went to the project directory and did a git remote get-url origin to find out the original source it came from.

    Output is: https://github.com/docker/docker

    Putting this URL into the browser redirects me to the github.com/moby/moby project, I think they must have setup a dns to redirect people to that URL.

    I haven't lookup or read about how the go get command works but it seems like there is a little bit of smartness in there to tell it that github.com/docker/docker is the actual project's URL which git clone would perform against. Then the /client bit is just a submodule or a directory of the project that it is cloning from.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化