从Ubuntu 12.04上的源代码构builddocker 0.7.2

我正在尝试从源代码构builddocker。 我在这里从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 Cp -- avilella char 30 is C-^ < if nr == 1 && buf[0] == 30 { --- > // char 16 is Cp > if nr == 1 && buf[0] == 16 { 

并用sudo make编译sudo make

它似乎是安装一个gazillion不同的ubuntu软件包,我不介意,只是需要一段时间来下载和configuration它们。

最后,我得到这个错误:

 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 buildsudo make build ,然后工作。 然后我跟着sudo make binary和下一步,它运行的很好。

如果您有兴趣帮助Docker开发,请参阅我们的文档“设置开发环境”页面: http : //docs.docker.io/en/latest/contributing/devenvironment/

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