719016
719016

Reputation: 10451

building docker 0.7.2 from sources on Ubuntu 12.04

I am trying to build docker from sources. I downloaded the latest release from the github.com account here:

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

Changed one line of code to make Ctrl-p Ctrl-q into 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 {

And compiled using sudo make:

It seems to be installing a gazillion different ubuntu packages, which I don't mind, only it's taking a while to download and configure them.

At the very end, I get this error:

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

Is this the right way to install this modified version of docker? The one I installed from apt-get was 0.7.1 but I wanted to modify that line of code in my copy.

EDITED:

I followed the instructions from devenvironment and got this error at the end of running 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

I re-did sudo make build after that, and then it worked. Then I followed with sudo make binary and the next step, and it worked well.

Upvotes: 0

Views: 705

Answers (1)

tianon
tianon

Reputation: 1914

If you're interested in helping contribute to Docker development, you'll want to check out the "Setting Up a Dev Environment" page of our documentation: http://docs.docker.io/en/latest/contributing/devenvironment/

You'll also want to be sure to check out our "CONTRIBUTING" document: https://github.com/dotcloud/docker/blob/master/CONTRIBUTING.md

Upvotes: 2

Related Questions