3

We're trying to change in the docker source code and re-build it to see the changes

Problem we're not able to build docker form the source code itself. we tried: make in the docker directory but we ended with the error(after initializing git by git init):

fatal: Needed a single revision
make: *** [binary] Error 128

This question didn't help, since we got the error:

fatal: Needed a single revision
invalid upstream origin/master

We checked the issue in docker community, and they suggested to clone the directory form the docker repository and re-build again, but we still can't make the source.

Question How to build the source code after we modified it?

Community
  • 1
  • 1
ThunderWiring
  • 738
  • 1
  • 7
  • 29
  • "but we still can't make the source." care to add a bit more detail there? Whet error message do you see? the same one? – VonC Nov 17 '15 at 05:45
  • yes, the same message – ThunderWiring Nov 17 '15 at 06:52
  • What does `git log` return in the folder where you do 'make'? – VonC Nov 17 '15 at 07:21
  • `fatal: bad default revision 'HEAD'` – ThunderWiring Nov 17 '15 at 07:25
  • That is why: you need to clone the repo which has the source, and make sure git log does give you its full history. You don't have to do any local giti init. Just a `git clone https://github.com/docker/docker && cd docker && git log && make` – VonC Nov 17 '15 at 07:26
  • What happens if you don't do "git init"? – Noamiko Nov 18 '15 at 17:31
  • @Noamiko: we get the error which is found on line 79 in `docker-master/hack/make.sh` : "`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!`" – ThunderWiring Nov 18 '15 at 18:57

1 Answers1

1

Follow the instructions in this link:

  1. Get the software you need.

    This explains how to install a couple of tools used in our development environment. What you need (or don’t need) might surprise you.

  2. Configure Git and fork the repo.

    Your Git configuration can make it easier for you to contribute. Configuration is especially key if are new to contributing or to Docker.

  3. Learn to work with the Docker development container.

    Docker developers run docker in docker. If you are a geek, this is a pretty cool experience.

  4. Claim an issue to work on.

    We created a filter listing all open and unclaimed issues for Docker.

  5. Work on the issue.

    If you change or add code or docs to a project, you should test your changes as you work. This page explains how to test in our development environment.

    Also, remember to always sign your commits as you work! To sign your commits, include the -s flag in your commit like this:

    $ git commit -s -m "Add commit with signature example"
    

    If you don't sign Gordon will get you!

  6. Create a pull request.

    If you make a change to fix an issue, add reference to the issue in the pull request.

Jamal
  • 763
  • 7
  • 22
  • 32
Noamiko
  • 729
  • 11
  • 19