gpt4 book ai didi

ubuntu - 从 Ubuntu 12.04 上的源代码构建 docker 0.7.2

转载 作者:行者123 更新时间:2023-12-02 21:29:52 26 4
gpt4 key购买 nike

我正在尝试从源代码构建 docker。我在这里从 github.com 帐户下载了最新版本:

https://github.com/dotcloud/docker/archive/v0.7.2.tar.gz

将一行代码改为 Ctrl-p Ctrl-q进入 Ctrl-^ Ctrl-q :

diff utils/utils.go utils/utils.go~
483,484c483,484
< // char 16 is C-p -- avilella char 30 is C-^
< if nr == 1 && buf[0] == 30 {
---
> // char 16 is C-p
> if nr == 1 && buf[0] == 16 {

并使用 sudo make 编译:

它似乎正在安装大量不同的 ubuntu 软件包,我不介意,只是下载和配置它们需要一些时间。

最后,我收到此错误:
docker run -rm -i -t -privileged -e TESTFLAGS -v /home/avilella/src/docker-0.7.2/bundles:/go/src/github.com/dotcloud/docker/bundles docker hack/make.sh binary


error: .git directory missing and DOCKER_GITCOMMIT not specified
Please either build with the .git directory accessible, or specify the
exact (--short) commit hash you are building using DOCKER_GITCOMMIT for
future accountability in diagnosing build issues. Thanks!
make: *** [binary] Error 1

这是安装此修改版 docker 的正确方法吗?我从 apt-get 安装的版本是 0.7.1,但我想修改副本中的那行代码。

编辑:

我按照 devenvironment 的说明进行操作并在运行结束时出现此错误 sudo make build .
[...]
---> fc087a0b8a35
Step 6 : RUN cd /usr/local/lvm2 && ./configure --enable-static_link && make device-mapper && make install_device-mapper
---> Running in f9b5130a3c33
x86_64-unknown-linux-gnu
x86_64-unknown-linux-gnu
x86_64-unknown-linux-gnu
/bin/sed

[...]

checking whether to include support for GFS pool metadata... internal
checking whether to include support for cluster locking... internal
checking whether to include snapshots... internal
checking whether to include mirrors... internal
checking whether to include raid... internal
checking whether to include replicators... none
checking whether to include thin provisioning... none
maybe

no
none
no
no
-O2
no
no
no
yes
no
no
no
no
no
no
pkg-config initialized
2014/01/02 18:03:44 unexpected EOF
make: *** [build] Error 1

我重新做了 sudo make build在那之后,然后它起作用了。然后我跟着 sudo make binary和下一步,它运作良好。

最佳答案

如果您有兴趣为 Docker 开发做出贡献,请查看我们文档的“设置开发环境”页面:http://docs.docker.io/en/latest/contributing/devenvironment/

您还需要确保查看我们的“贡献”文档:https://github.com/dotcloud/docker/blob/master/CONTRIBUTING.md

关于ubuntu - 从 Ubuntu 12.04 上的源代码构建 docker 0.7.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20886408/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com