dpkrbe395930 2019-04-02 07:46
浏览 270
已采纳

docker-ce中containerd / runc的代码在哪里?

I am trying to debug docker (including everything, docker, dockerd, containerd, runc), and have cloned source code from github/docker/docker-ce.

Now I can locate the source code of:

  • docker (docker-cli): at components/cli
  • dockerd: at components/engine/daemon

in repo of docker-ce and successfully make them.

But I cannot find the code of containerd and runc in docker-ce repo, while there are binaries of them when make command is triggered.

So where the binaries come from?

I know there are repos of containerd and runc.

  • 写回答

1条回答 默认 最新

  • dongsheng4126335 2019-04-02 12:43
    关注

    Here's my own findings from a quick scan. The Makefile for components/engine includes various steps, including a docker build.

    The Dockerfile includes sections for containerd and runc:

    FROM base AS containerd
    RUN apt-get update && apt-get install -y btrfs-tools
    ENV INSTALL_BINARY_NAME=containerd
    COPY hack/dockerfile/install/install.sh ./install.sh
    COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
    RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME
    
    FROM runtime-dev AS runc
    ENV INSTALL_BINARY_NAME=runc
    COPY hack/dockerfile/install/install.sh ./install.sh
    COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
    RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME
    

    Then in the hack folder for the dockerfile, there are scripts to install containerd and runc.

    These scripts clone the repo and checkout specific commits from containerd and runc's upstream repos.

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

报告相同问题?

问题事件

  • 提问应符合社区要求 11月27日

悬赏问题

  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!