diff --git a/docs/project/advanced-contributing.md b/docs/project/advanced-contributing.md deleted file mode 100644 index 79a8c68635..0000000000 --- a/docs/project/advanced-contributing.md +++ /dev/null @@ -1,159 +0,0 @@ - - -# Advanced contributing - -In this section, you learn about the more advanced contributions you can make. -They are advanced because they have a more involved workflow or require greater -programming experience. Don't be scared off though, if you like to stretch and -challenge yourself, this is the place for you. - -This section gives generalized instructions for advanced contributions. You'll -read about the workflow but there are not specific descriptions of commands. -Your goal should be to understand the processes described. - -At this point, you should have read and worked through the earlier parts of -the project contributor guide. You should also have - made at least one project contribution. - -## Refactor or cleanup proposal - -A refactor or cleanup proposal changes Docker's internal structure without -altering the external behavior. To make this type of proposal: - -1. Fork `docker/docker`. - -2. Make your changes in a feature branch. - -3. Sync and rebase with `master` as you work. - -3. Run the full test suite. - -4. Submit your code through a pull request (PR). - - The PR's title should have the format: - - **Cleanup:** _short title_ - - If your changes required logic changes, note that in your request. - -5. Work through Docker's review process until merge. - - -## Design proposal - -A design proposal solves a problem or adds a feature to the Docker software. -The process for submitting design proposals requires two pull requests, one -for the design and one for the implementation. - -![Simple process](images/proposal.png) - -The important thing to notice is that both the design pull request and the -implementation pull request go through a review. In other words, there is -considerable time commitment in a design proposal; so, you might want to pair -with someone on design work. - -The following provides greater detail on the process: - -1. Come up with an idea. - - Ideas usually come from limitations users feel working with a product. So, - take some time to really use Docker. Try it on different platforms; explore - how it works with different web applications. Go to some community events - and find out what other users want. - -2. Review existing issues and proposals to make sure no other user is proposing a similar idea. - - The design proposals are all online in our GitHub pull requests. - -3. Talk to the community about your idea. - - We have lots of community forums - where you can get feedback on your idea. Float your idea in a forum or two - to get some commentary going on it. - -4. Fork `docker/docker` and clone the repo to your local host. - -5. Create a new Markdown file in the area you wish to change. - - For example, if you want to redesign our daemon create a new file under the - `daemon/` folder. - -6. Name the file descriptively, for example `redesign-daemon-proposal.md`. - -7. Write a proposal for your change into the file. - - This is a Markdown file that describes your idea. Your proposal - should include information like: - - * Why is this change needed or what are the use cases? - * What are the requirements this change should meet? - * What are some ways to design/implement this feature? - * Which design/implementation do you think is best and why? - * What are the risks or limitations of your proposal? - - This is your chance to convince people your idea is sound. - -8. Submit your proposal in a pull request to `docker/docker`. - - The title should have the format: - - **Proposal:** _short title_ - - The body of the pull request should include a brief summary of your change - and then say something like "_See the file for a complete description_". - -9. Refine your proposal through review. - - The maintainers and the community review your proposal. You'll need to - answer questions and sometimes explain or defend your approach. This is - chance for everyone to both teach and learn. - -10. Pull request accepted. - - Your request may also be rejected. Not every idea is a good fit for Docker. - Let's assume though your proposal succeeded. - -11. Implement your idea. - - Implementation uses all the standard practices of any contribution. - - * fork `docker/docker` - * create a feature branch - * sync frequently back to master - * test as you go and full test before a PR - - If you run into issues, the community is there to help. - -12. When you have a complete implementation, submit a pull request back to `docker/docker`. - -13. Review and iterate on your code. - - If you are making a large code change, you can expect greater scrutiny - during this phase. - -14. Acceptance and merge! - -## About the advanced process - -Docker is a large project. Our core team gets a great many design proposals. -Design proposal discussions can span days, weeks, and longer. The number of comments can reach the 100s. -In that situation, following the discussion flow and the decisions reached is crucial. - -Making a pull request with a design proposal simplifies this process: -* you can leave comments on specific design proposal line -* replies around line are easy to track -* as a proposal changes and is updated, pages reset as line items resolve -* GitHub maintains the entire history - -While proposals in pull requests do not end up merged into a master repository, they provide a convenient tool for managing the design process. diff --git a/docs/project/coding-style.md b/docs/project/coding-style.md deleted file mode 100644 index 00bd9ed848..0000000000 --- a/docs/project/coding-style.md +++ /dev/null @@ -1,103 +0,0 @@ - - -# Coding style checklist - -This checklist summarizes the material you experienced working through [make a -code contribution](make-a-contribution.md) and [advanced -contributing](advanced-contributing.md). The checklist applies to both -program code and documentation code. - -## Change and commit code - -* Fork the `docker/docker` repository. - -* Make changes on your fork in a feature branch. Name your branch `XXXX-something` - where `XXXX` is the issue number you are working on. - -* Run `gofmt -s -w file.go` on each changed file before - committing your changes. Most editors have plug-ins that do this automatically. - -* Run `golint` on each changed file before - committing your changes. - -* Update the documentation when creating or modifying features. - -* Commits that fix or close an issue should reference them in the commit message - `Closes #XXXX` or `Fixes #XXXX`. Mentions help by automatically closing the - issue on a merge. - -* After every commit, run the test suite and ensure it is passing. - -* Sync and rebase frequently as you code to keep up with `docker` master. - -* Set your `git` signature and make sure you sign each commit. - -* Do not add yourself to the `AUTHORS` file. This file is autogenerated from the - Git history. - -## Tests and testing - -* Submit unit tests for your changes. - -* Make use of the builtin Go test framework built. - -* Use existing Docker test files (`name_test.go`) for inspiration. - -* Run the full test suite on your - branch before submitting a pull request. - -* Run `make docs` to build the documentation and then check it locally. - -* Use an online grammar - checker or similar to test you documentation changes for clarity, - concision, and correctness. - -## Pull requests - -* Sync and cleanly rebase on top of Docker's `master` without multiple branches - mixed into the PR. - -* Before the pull request, squash your commits into logical units of work using - `git rebase -i` and `git push -f`. - -* Include documentation changes in the same commit so that a revert would - remove all traces of the feature or fix. - -* Reference each issue in your pull request description (`#XXXX`) - -## Respond to pull requests reviews - -* Docker maintainers use LGTM (**l**ooks-**g**ood-**t**o-**m**e) in PR comments - to indicate acceptance. - -* Code review comments may be added to your pull request. Discuss, then make - the suggested modifications and push additional commits to your feature - branch. - -* Incorporate changes on your feature branch and push to your fork. This - automatically updates your open pull request. - -* Post a comment after pushing to alert reviewers to PR changes; pushing a - change does not send notifications. - -* A change requires LGTMs from an absolute majority maintainers of an - affected component. For example, if you change `docs/` and `registry/` code, - an absolute majority of the `docs/` and the `registry/` maintainers must - approve your PR. - -## Merges after pull requests - -* After a merge, [a master build](https://master.dockerproject.org/) is - available almost immediately. - -* If you made a documentation change, you can see it at - [docs.master.dockerproject.org](http://docs.master.dockerproject.org/). diff --git a/docs/project/create-pr.md b/docs/project/create-pr.md deleted file mode 100644 index fc5f626e91..0000000000 --- a/docs/project/create-pr.md +++ /dev/null @@ -1,138 +0,0 @@ - - -# Create a pull request (PR) - -A pull request (PR) sends your changes to the Docker maintainers for review. You -create a pull request on GitHub. A pull request "pulls" changes from your forked -repository into the `docker/docker` repository. - -You can see the -list of active pull requests to Docker on GitHub. - -## Check your work - -Before you create a pull request, check your work. - -1. In a terminal window, go to the root of your `docker-fork` repository. - - $ cd ~/repos/docker-fork - -2. Checkout your feature branch. - - $ git checkout 11038-fix-rhel-link - Switched to branch '11038-fix-rhel-link' - -3. Run the full test suite on your branch. - - $ make test - - All the tests should pass. If they don't, find out why and correct the - situation. - -4. Optionally, if modified the documentation, build the documentation: - - $ make docs - -5. Commit and push any changes that result from your checks. - -## Rebase your branch - -Always rebase and squash your commits before making a pull request. - -1. Checkout your feature branch in your local `docker-fork` repository. - - This is the branch associated with your request. - -2. Fetch any last minute changes from `docker/docker`. - - $ git fetch upstream master - From github.com:docker/docker - * branch master -> FETCH_HEAD - -3. Start an interactive rebase. - - $ git rebase -i upstream/master - -4. Rebase opens an editor with a list of commits. - - pick 1a79f55 Tweak some of the other text for grammar - pick 53e4983 Fix a link - pick 3ce07bb Add a new line about RHEL - -5. Replace the `pick` keyword with `squash` on all but the first commit. - - pick 1a79f55 Tweak some of the other text for grammar - squash 53e4983 Fix a link - squash 3ce07bb Add a new line about RHEL - - After you save the changes and quit from the editor, git starts - the rebase, reporting the progress along the way. Sometimes - your changes can conflict with the work of others. If git - encounters a conflict, it stops the rebase, and prints guidance - for how to correct the conflict. - -6. Edit and save your commit message. - - $ git commit -s - - Make sure your message includes your signature. - -7. Force push any changes to your fork on GitHub. - - $ git push -f origin 11038-fix-rhel-link - -## Create a PR on GitHub - -You create and manage PRs on GitHub: - -1. Open your browser to your fork on GitHub. - - You should see the latest activity from your branch. - - ![Latest commits](images/latest_commits.png) - - -2. Click "Compare & pull request." - - The system displays the pull request dialog. - - ![PR dialog](images/to_from_pr.png) - - The pull request compares your changes to the `master` branch on the - `docker/docker` repository. - -3. Edit the dialog's description and add a reference to the issue you are fixing. - - GitHub helps you out by searching for the issue as you type. - - ![Fixes issue](images/fixes_num.png) - -4. Scroll down and verify the PR contains the commits and changes you expect. - - For example, is the file count correct? Are the changes in the files what - you expect? - - ![Commits](images/commits_expected.png) - -5. Press "Create pull request". - - The system creates the request and opens it for you in the `docker/docker` - repository. - - ![Pull request made](images/pull_request_made.png) - - -## Where to go next - -Congratulations, you've created your first pull request to Docker. The next -step is for you learn how to [participate in your PR's -review](review-pr.md). diff --git a/docs/project/doc-style.md b/docs/project/doc-style.md deleted file mode 100644 index e6efe9c7fa..0000000000 --- a/docs/project/doc-style.md +++ /dev/null @@ -1,283 +0,0 @@ - - -# Docker documentation: style & grammar conventions - -## Style standards - -Over time, different publishing communities have written standards for the style -and grammar they prefer in their publications. These standards are called -[style guides](http://en.wikipedia.org/wiki/Style_guide). Generally, Docker’s -documentation uses the standards described in the -[Associated Press's (AP) style guide](http://en.wikipedia.org/wiki/AP_Stylebook). -If a question about syntactical, grammatical, or lexical practice comes up, -refer to the AP guide first. If you don’t have a copy of (or online subscription -to) the AP guide, you can almost always find an answer to a specific question by -searching the web. If you can’t find an answer, please ask a -[maintainer](https://github.com/docker/docker/blob/master/MAINTAINERS) and -we will find the answer. - -That said, please don't get too hung up on using correct style. We'd rather have -you submit good information that doesn't conform to the guide than no -information at all. Docker's tech writers are always happy to help you with the -prose, and we promise not to judge or use a red pen! - -> **Note:** -> The documentation is written with paragraphs wrapped at 80 column lines to -> make it easier for terminal use. You can probably set up your favorite text -> editor to do this automatically for you. - -### Prose style - -In general, try to write simple, declarative prose. We prefer short, -single-clause sentences and brief three-to-five sentence paragraphs. Try to -choose vocabulary that is straightforward and precise. Avoid creating new terms, -using obscure terms or, in particular, using a lot of jargon. For example, use -"use" instead of leveraging "leverage". - -That said, don’t feel like you have to write for localization or for -English-as-a-second-language (ESL) speakers specifically. Assume you are writing -for an ordinary speaker of English with a basic university education. If your -prose is simple, clear, and straightforward it will translate readily. - -One way to think about this is to assume Docker’s users are generally university -educated and read at at least a "16th" grade level (meaning they have a -university degree). You can use a [readability -tester](https://readability-score.com/) to help guide your judgement. For -example, the readability score for the phrase "Containers should be ephemeral" -is around the 13th grade level (first year at university), and so is acceptable. - -In all cases, we prefer clear, concise communication over stilted, formal -language. Don't feel like you have to write documentation that "sounds like -technical writing." - -### Metaphor and figurative language - -One exception to the "don’t write directly for ESL" rule is to avoid the use of -metaphor or other -[figurative language](http://en.wikipedia.org/wiki/Literal_and_figurative_language) to -describe things. There are too many cultural and social issues that can prevent -a reader from correctly interpreting a metaphor. - -## Specific conventions - -Below are some specific recommendations (and a few deviations) from AP style -that we use in our docs. - -### Contractions - -As long as your prose does not become too slangy or informal, it's perfectly -acceptable to use contractions in our documentation. Make sure to use -apostrophes correctly. - -### Use of dashes in a sentence. - -Dashes refers to the en dash (–) and the em dash (—). Dashes can be used to -separate parenthetical material. - -Usage Example: This is an example of a Docker client – which uses the Big Widget -to run – and does x, y, and z. - -Use dashes cautiously and consider whether commas or parentheses would work just -as well. We always emphasize short, succinct sentences. - -More info from the always handy [Grammar Girl site](http://www.quickanddirtytips.com/education/grammar/dashes-parentheses-and-commas). - -### Pronouns - -It's okay to use first and second person pronouns, especially if it lets you avoid a passive construction. Specifically, always use "we" to -refer to Docker and "you" to refer to the user. For example, "We built the -`exec` command so you can resize a TTY session." That said, in general, try to write simple, imperative sentences that avoid the use of pronouns altogether. Say "Now, enter your SSH key" rather than "You can now enter your SSH key." - -As much as possible, avoid using gendered pronouns ("he" and "she", etc.). -Either recast the sentence so the pronoun is not needed or, less preferably, -use "they" instead. If you absolutely can't get around using a gendered pronoun, -pick one and stick to it. Which one you choose is up to you. One common -convention is to use the pronoun of the author's gender, but if you prefer to -default to "he" or "she", that's fine too. - -### Capitalization - -#### In general - -Only proper nouns should be capitalized in body text. In general, strive to be -as strict as possible in applying this rule. Avoid using capitals for emphasis -or to denote "specialness". - -The word "Docker" should always be capitalized when referring to either the -company or the technology. The only exception is when the term appears in a code -sample. - -#### Starting sentences - -Because code samples should always be written exactly as they would appear -on-screen, you should avoid starting sentences with a code sample. - -#### In headings - -Headings take sentence capitalization, meaning that only the first letter is -capitalized (and words that would normally be capitalized in a sentence, e.g., -"Docker"). Do not use Title Case (i.e., capitalizing every word) for headings. Generally, we adhere to [AP style -for titles](http://www.quickanddirtytips.com/education/grammar/capitalizing-titles). - -### Periods - -We prefer one space after a period at the end of a sentence, not two. - -See [lists](#lists) below for how to punctuate list items. - -### Abbreviations and acronyms - -* Exempli gratia (e.g.) and id est ( i.e.): these should always have periods and -are always followed by a comma. - -* Acronyms are pluralized by simply adding "s", e.g., PCs, OSs. - -* On first use on a given page, the complete term should be used, with the -abbreviation or acronym in parentheses. E.g., Red Hat Enterprise Linux (RHEL). -The exception is common, non-technical acronyms like AKA or ASAP. Note that -acronyms other than i.e. and e.g. are capitalized. - -* Other than "e.g." and "i.e." (as discussed above), acronyms do not take -periods, PC not P.C. - - -### Lists - -When writing lists, keep the following in mind: - -Use bullets when the items being listed are independent of each other and the -order of presentation is not important. - -Use numbers for steps that have to happen in order or if you have mentioned the -list in introductory text. For example, if you wrote "There are three config -settings available for SSL, as follows:", you would number each config setting -in the subsequent list. - -In all lists, if an item is a complete sentence, it should end with a -period. Otherwise, we prefer no terminal punctuation for list items. -Each item in a list should start with a capital. - -### Numbers - -Write out numbers in body text and titles from one to ten. From 11 on, use numerals. - -### Notes - -Use notes sparingly and only to bring things to the reader's attention that are -critical or otherwise deserving of being called out from the body text. Please -format all notes as follows: - - > **Note:** - > One line of note text - > another line of note text - -### Avoid excess use of "i.e." - -Minimize your use of "i.e.". It can add an unnecessary interpretive burden on -the reader. Avoid writing "This is a thing, i.e., it is like this". Just -say what it is: "This thing is …" - -### Preferred usages - -#### Login vs. log in. - -A "login" is a noun (one word), as in "Enter your login". "Log in" is a compound -verb (two words), as in "Log in to the terminal". - -### Oxford comma - -One way in which we differ from AP style is that Docker’s docs use the [Oxford -comma](http://en.wikipedia.org/wiki/Serial_comma) in all cases. That’s our -position on this controversial topic, we won't change our mind, and that’s that! - -### Code and UI text styling - -We require `code font` styling (monospace, sans-serif) for all text that refers -to a command or other input or output from the CLI. This includes file paths -(e.g., `/etc/hosts/docker.conf`). If you enclose text in backticks (`) markdown -will style the text as code. - -Text from a CLI should be quoted verbatim, even if it contains errors or its -style contradicts this guide. You can add "(sic)" after the quote to indicate -the errors are in the quote and are not errors in our docs. - -Text taken from a GUI (e.g., menu text or button text) should appear in "double -quotes". The text should take the exact same capitalisation, etc. as appears in -the GUI. E.g., Click "Continue" to save the settings. - -Text that refers to a keyboard command or hotkey is capitalized (e.g., Ctrl-D). - -When writing CLI examples, give the user hints by making the examples resemble -exactly what they see in their shell: - -* Indent shell examples by 4 spaces so they get rendered as code blocks. -* Start typed commands with `$ ` (dollar space), so that they are easily - differentiated from program output. -* Program output has no prefix. -* Comments begin with # (hash space). -* In-container shell commands, begin with `$$ ` (dollar dollar space). - -Please test all code samples to ensure that they are correct and functional so -that users can successfully cut-and-paste samples directly into the CLI. - -## Pull requests - -The pull request (PR) process is in place so that we can ensure changes made to -the docs are the best changes possible. A good PR will do some or all of the -following: - -* Explain why the change is needed -* Point out potential issues or questions -* Ask for help from experts in the company or the community -* Encourage feedback from core developers and others involved in creating the - software being documented. - -Writing a PR that is singular in focus and has clear objectives will encourage -all of the above. Done correctly, the process allows reviewers (maintainers and -community members) to validate the claims of the documentation and identify -potential problems in communication or presentation. - -### Commit messages - -In order to write clear, useful commit messages, please follow these -[recommendations](http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message). - -## Links - -For accessibility and usability reasons, avoid using phrases such as "click -here" for link text. Recast your sentence so that the link text describes the -content of the link, as we did in the -["Commit messages" section](#commit-messages) above. - -You can use relative links (../linkeditem) to link to other pages in Docker's -documentation. - -## Graphics - -When you need to add a graphic, try to make the file-size as small as possible. -If you need help reducing file-size of a high-resolution image, feel free to -contact us for help. -Usually, graphics should go in the same directory as the .md file that -references them, or in a subdirectory for images if one already exists. - -The preferred file format for graphics is PNG, but GIF and JPG are also -acceptable. - -If you are referring to a specific part of the UI in an image, use -call-outs (circles and arrows or lines) to highlight what you’re referring to. -Line width for call-outs should not exceed five pixels. The preferred color for -call-outs is red. - -Be sure to include descriptive alt-text for the graphic. This greatly helps -users with accessibility issues. - -Lastly, be sure you have permission to use any included graphics. \ No newline at end of file diff --git a/docs/project/find-an-issue.md b/docs/project/find-an-issue.md deleted file mode 100644 index 140f0f88df..0000000000 --- a/docs/project/find-an-issue.md +++ /dev/null @@ -1,237 +0,0 @@ - - - - - -# Find and claim an issue - -On this page, you choose the issue you want to work on. As a contributor, you can work -on whatever you want. If you are new to contributing, you should start by -working with our known issues. - -## Understand the issue types - -An existing issue is something reported by a Docker user. As issues come in, -our maintainers triage them. Triage is its own topic. For now, it is important -for you to know that triage includes ranking issues according to difficulty. - -Triaged issues have one of these labels: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LabelExperience level guideline
exp/beginnerYou have made less than ten contributions in your life time to any open source project.
exp/noviceYou have made more than ten contributions to an open source project or at least 5 contributions to Docker.
exp/proficientYou have made more than five contributions to Docker which amount to at least 200 code lines or 1000 documentation lines.
exp/expertYou have made less than 20 commits to Docker which amount to 500-1000 code lines or 1000-3000 documentation lines.
exp/masterYou have made more than 20 commits to Docker and greater than 1000 code lines or 3000 documentation lines.
- -These labels are guidelines. You might have written a whole plugin for Docker in a personal -project and never contributed to Docker. With that kind of experience, you could take on an exp/expert or exp/master level issue. - -## Claim a beginner or novice issue - -To claim an issue: - -1. Go to the `docker/docker` repository. - -2. Click the "Issues" link. - - A list of the open issues appears. - - ![Open issues](images/issue_list.png) - -3. From the "Labels" drop-down, select exp/beginner. - - The system filters to show only open exp/beginner issues. - -4. Open an issue that interests you. - - The comments on the issues describe the problem and can provide information for a potential - solution. - -5. When you find an open issue that both interests you and is unclaimed, add a -`#dibs` comment. Make sure that no other user has chosen to work on the issue. - - The project does not permit external contributors to assign issues to themselves. Read - the comments to find if a user claimed the issue by leaving a - `#dibs` comment on the issue. - -7. Your issue # will be different depending on what you claimed. After a moment, Gordon the Docker -bot, changes the issue status to claimed. The following example shows issue #11038. - - ![Easy issue](images/easy_issue.png) - -8. Make a note of the issue number; you will need it for later. - -## Sync your fork and create a new branch - -If you have followed along in this guide, you forked the `docker/docker` -repository. Maybe that was an hour ago or a few days ago. In any case, before -you start working on your issue, sync your repository with the upstream -`docker/docker` master. Syncing ensures your repository has the latest -changes. - -To sync your repository: - -1. Open a terminal on your local host. - -2. Change directory to the `docker-fork` root. - - $ cd ~/repos/docker-fork - -3. Checkout the master branch. - - $ git checkout master - Switched to branch 'master' - Your branch is up-to-date with 'origin/master'. - - Recall that `origin/master` is a branch on your remote GitHub repository. - -4. Make sure you have the upstream remote `docker/docker` by listing them. - - $ git remote -v - origin https://github.com/moxiegirl/docker.git (fetch) - origin https://github.com/moxiegirl/docker.git (push) - upstream https://github.com/docker/docker.git (fetch) - upstream https://github.com/docker/docker.git (push) - - If the `upstream` is missing, add it. - - $ git remote add upstream https://github.com/docker/docker.git - -5. Fetch all the changes from the `upstream master` branch. - - $ git fetch upstream master - remote: Counting objects: 141, done. - remote: Compressing objects: 100% (29/29), done. - remote: Total 141 (delta 52), reused 46 (delta 46), pack-reused 66 - Receiving objects: 100% (141/141), 112.43 KiB | 0 bytes/s, done. - Resolving deltas: 100% (79/79), done. - From github.com:docker/docker - * branch master -> FETCH_HEAD - - This command says get all the changes from the `master` branch belonging to - the `upstream` remote. - -7. Rebase your local master with the `upstream/master`. - - $ git rebase upstream/master - First, rewinding head to replay your work on top of it... - Fast-forwarded master to upstream/master. - - This command applies all the commits from the upstream master to your local - master. - -8. Check the status of your local branch. - - $ git status - On branch master - Your branch is ahead of 'origin/master' by 38 commits. - (use "git push" to publish your local commits) - nothing to commit, working directory clean - - Your local repository now has all the changes from the `upstream` remote. You - need to push the changes to your own remote fork which is `origin master`. - -9. Push the rebased master to `origin master`. - - $ git push origin master - Username for 'https://github.com': moxiegirl - Password for 'https://moxiegirl@github.com': - Counting objects: 223, done. - Compressing objects: 100% (38/38), done. - Writing objects: 100% (69/69), 8.76 KiB | 0 bytes/s, done. - Total 69 (delta 53), reused 47 (delta 31) - To https://github.com/moxiegirl/docker.git - 8e107a9..5035fa1 master -> master - -9. Create a new feature branch to work on your issue. - - Your branch name should have the format `XXXX-descriptive` where `XXXX` is - the issue number you are working on. For example: - - $ git checkout -b 11038-fix-rhel-link - Switched to a new branch '11038-fix-rhel-link' - - Your branch should be up-to-date with the `upstream/master`. Why? Because you - branched off a freshly synced master. Let's check this anyway in the next - step. - -9. Rebase your branch from upstream/master. - - $ git rebase upstream/master - Current branch 11038-fix-rhel-link is up to date. - - At this point, your local branch, your remote repository, and the Docker - repository all have identical code. You are ready to make changes for your - issue. - - -## Where to go next - -At this point, you know what you want to work on and you have a branch to do -your work in. Go onto the next section to learn [how to work on your -changes](work-issue.md). diff --git a/docs/project/get-help.md b/docs/project/get-help.md deleted file mode 100644 index dabf462625..0000000000 --- a/docs/project/get-help.md +++ /dev/null @@ -1,224 +0,0 @@ - - - - -# Where to chat or get help - -There are several communications channels you can use to chat with Docker -community members and developers. - - - - - - - - - - - - - - - - - - - -
Internet Relay Chat (IRC) - -

- IRC a direct line to our most knowledgeable Docker users. - The #docker and #docker-dev group on - chat.freenode.net. IRC was first created in 1988. - So, it is a rich chat protocol but it can overwhelm new users. You can search - our chat archives. -

- Use our IRC quickstart guide below for easy ways to get started with IRC. -
Google Groups - There are two groups. - Docker-user - is for people using Docker containers. - The docker-dev - group is for contributors and other people contributing to the Docker - project. -
Twitter - You can follow Docker's twitter - to get updates on our products. You can also tweet us questions or just - share blogs or stories. -
Stack Overflow - Stack Overflow has over 7000K Docker questions listed. We regularly - monitor Docker questions - and so do many other knowledgeable Docker users. -
- - -# IRC Quickstart - -The following instructions show you how to register with two web based IRC -tools. Use one illustrated here or find another. While these instructions are -only for two IRC web clients there are many IRC Clients available on most -platforms. - -## Webchat - -Using Webchat from Freenode.net is a quick and easy way to get chatting. To -register: - -1. In your browser open https://webchat.freenode.net - - ![Login to webchat screen](images/irc_connect.png) - -2. Fill out the form. - - - - - - - - - - - - - - -
NicknameThe short name you want to be known as on IRC chat channels.
Channels#docker
reCAPTCHAUse the value provided.
- -3. Click on the "Connect" button. - - The browser connects you to Webchat. You'll see a lot of text. At the bottom of - the Webchat web page is a command line bar. Just above the command line bar - a message is shown asking you to register. - - ![Registration needed screen](images/irc_after_login.png) - -4. Register your nickname by entering the following command in the -command line bar: - - /msg NickServ REGISTER yourpassword youremail@example.com - - ![Registering screen](images/register_nic.png) - - This command line bar is also the entry field that you will use for entering - chat messages into IRC chat channels after you have registered and joined a - chat channel. - - After entering the REGISTER command, an email is sent to the email address - that you provided. This email will contain instructions for completing - your registration. - -5. Open your email client and look for the email. - - ![Login screen](images/register_email.png) - -6. Back in the browser, complete the registration according to the email -by entering the following command into the webchat command line bar: - - /msg NickServ VERIFY REGISTER yournickname somecode - - Your nickname is now registered to chat on freenode.net. - -[Jump ahead to tips to join a docker channel and start chatting](#tips) - -## IRCCloud - -IRCCloud is a web-based IRC client service that is hosted in the cloud. This is -a Freemium product, meaning the free version is limited and you can pay for more -features. To use IRCCloud: - -1. Select the following link: - Join the #docker channel on chat.freenode.net - - The following web page is displayed in your browser: - - ![IRCCloud Register screen](images/irccloud-join.png) - -2. If this is your first time using IRCCloud enter a valid email address in the -form. People who have already registered with IRCCloud can select the "sign in -here" link. Additionally, people who are already registered with IRCCloud may -have a cookie stored on their web browser that enables a quick start "let's go" -link to be shown instead of the above form. In this case just select the -"let's go" link and [jump ahead to start chatting](#start-chatting) - -3. After entering your email address in the form, check your email for an invite -from IRCCloud and follow the instructions provided in the email. - -4. After following the instructions in your email you should have an IRCCloud -Client web page in your browser: - - ![IRCCloud](images/irccloud-register-nick.png) - - The message shown above may appear indicating that you need to register your - nickname. - -5. To register your nickname enter the following message into the command line bar -at the bottom of the IRCCloud Client: - - /msg NickServ REGISTER yourpassword youremail@example.com - - This command line bar is for chatting and entering in IRC commands. - -6. Check your email for an invite to freenode.net: - - ![Login screen](images/register_email.png) - -7. Back in the browser, complete the registration according to the email. - - /msg NickServ VERIFY REGISTER yournickname somecode - -## Tips - -The procedures in this section apply to both IRC clients. - -### Set a nickname - -Next time you return to log into chat, you may need to re-enter your password -on the command line using this command: - - /msg NickServ identify - -With Webchat if you forget or lose your password see the FAQ on -freenode.net to learn how to recover it. - -### Join a Docker Channel - -Join the `#docker` group using the following command in the command line bar of -your IRC Client: - - /j #docker - -You can also join the `#docker-dev` group: - - /j #docker-dev - -### Start chatting - -To ask questions to the group just type messages in the command line bar: - - ![Web Chat Screen](images/irc_chat.png) - -## Learning more about IRC - -This quickstart was meant to get you up and into IRC very quickly. If you find -IRC useful there is more to learn. Drupal, another open source project, -has -written some documentation about using IRC for their project -(thanks Drupal!). - diff --git a/docs/project/images/box.png b/docs/project/images/box.png deleted file mode 100644 index 642385ae68..0000000000 Binary files a/docs/project/images/box.png and /dev/null differ diff --git a/docs/project/images/branch-sig.png b/docs/project/images/branch-sig.png deleted file mode 100644 index b30f007ba6..0000000000 Binary files a/docs/project/images/branch-sig.png and /dev/null differ diff --git a/docs/project/images/checked.png b/docs/project/images/checked.png deleted file mode 100644 index 93ab2be9b3..0000000000 Binary files a/docs/project/images/checked.png and /dev/null differ diff --git a/docs/project/images/commits_expected.png b/docs/project/images/commits_expected.png deleted file mode 100644 index d3d8b1e3cf..0000000000 Binary files a/docs/project/images/commits_expected.png and /dev/null differ diff --git a/docs/project/images/contributor-edit.png b/docs/project/images/contributor-edit.png deleted file mode 100644 index 52737d7b46..0000000000 Binary files a/docs/project/images/contributor-edit.png and /dev/null differ diff --git a/docs/project/images/copy_url.png b/docs/project/images/copy_url.png deleted file mode 100644 index a715019ed8..0000000000 Binary files a/docs/project/images/copy_url.png and /dev/null differ diff --git a/docs/project/images/easy_issue.png b/docs/project/images/easy_issue.png deleted file mode 100644 index 6d346bcd87..0000000000 Binary files a/docs/project/images/easy_issue.png and /dev/null differ diff --git a/docs/project/images/existing_issue.png b/docs/project/images/existing_issue.png deleted file mode 100644 index 6757e60bb7..0000000000 Binary files a/docs/project/images/existing_issue.png and /dev/null differ diff --git a/docs/project/images/existing_issue.snagproj b/docs/project/images/existing_issue.snagproj deleted file mode 100644 index 05ae2b0ccf..0000000000 Binary files a/docs/project/images/existing_issue.snagproj and /dev/null differ diff --git a/docs/project/images/fixes_num.png b/docs/project/images/fixes_num.png deleted file mode 100644 index df52f27fd9..0000000000 Binary files a/docs/project/images/fixes_num.png and /dev/null differ diff --git a/docs/project/images/fork_docker.png b/docs/project/images/fork_docker.png deleted file mode 100644 index f7c557cd4f..0000000000 Binary files a/docs/project/images/fork_docker.png and /dev/null differ diff --git a/docs/project/images/fresh_container.png b/docs/project/images/fresh_container.png deleted file mode 100644 index 7f69f2d3a5..0000000000 Binary files a/docs/project/images/fresh_container.png and /dev/null differ diff --git a/docs/project/images/git_bash.png b/docs/project/images/git_bash.png deleted file mode 100644 index 153fd2fbb9..0000000000 Binary files a/docs/project/images/git_bash.png and /dev/null differ diff --git a/docs/project/images/give_try.png b/docs/project/images/give_try.png deleted file mode 100644 index c049527616..0000000000 Binary files a/docs/project/images/give_try.png and /dev/null differ diff --git a/docs/project/images/gordon.jpeg b/docs/project/images/gordon.jpeg deleted file mode 100644 index 8a0df7d463..0000000000 Binary files a/docs/project/images/gordon.jpeg and /dev/null differ diff --git a/docs/project/images/in_room.png b/docs/project/images/in_room.png deleted file mode 100644 index 4fdec81b9c..0000000000 Binary files a/docs/project/images/in_room.png and /dev/null differ diff --git a/docs/project/images/include_gcc.png b/docs/project/images/include_gcc.png deleted file mode 100644 index e48f50cdf9..0000000000 Binary files a/docs/project/images/include_gcc.png and /dev/null differ diff --git a/docs/project/images/irc_after_login.png b/docs/project/images/irc_after_login.png deleted file mode 100644 index 79496c806d..0000000000 Binary files a/docs/project/images/irc_after_login.png and /dev/null differ diff --git a/docs/project/images/irc_chat.png b/docs/project/images/irc_chat.png deleted file mode 100644 index 6266020f65..0000000000 Binary files a/docs/project/images/irc_chat.png and /dev/null differ diff --git a/docs/project/images/irc_connect.png b/docs/project/images/irc_connect.png deleted file mode 100644 index f411aabcac..0000000000 Binary files a/docs/project/images/irc_connect.png and /dev/null differ diff --git a/docs/project/images/irc_login.png b/docs/project/images/irc_login.png deleted file mode 100644 index a7a1dc7eb4..0000000000 Binary files a/docs/project/images/irc_login.png and /dev/null differ diff --git a/docs/project/images/irccloud-join.png b/docs/project/images/irccloud-join.png deleted file mode 100644 index 068b2c4b20..0000000000 Binary files a/docs/project/images/irccloud-join.png and /dev/null differ diff --git a/docs/project/images/irccloud-register-nick.png b/docs/project/images/irccloud-register-nick.png deleted file mode 100644 index 60c8560565..0000000000 Binary files a/docs/project/images/irccloud-register-nick.png and /dev/null differ diff --git a/docs/project/images/issue_list.png b/docs/project/images/issue_list.png deleted file mode 100644 index 0d954986bb..0000000000 Binary files a/docs/project/images/issue_list.png and /dev/null differ diff --git a/docs/project/images/latest_commits.png b/docs/project/images/latest_commits.png deleted file mode 100644 index 791683a5c5..0000000000 Binary files a/docs/project/images/latest_commits.png and /dev/null differ diff --git a/docs/project/images/list_example.png b/docs/project/images/list_example.png deleted file mode 100644 index a306e6e7dd..0000000000 Binary files a/docs/project/images/list_example.png and /dev/null differ diff --git a/docs/project/images/locate_branch.png b/docs/project/images/locate_branch.png deleted file mode 100644 index b865cfcbf4..0000000000 Binary files a/docs/project/images/locate_branch.png and /dev/null differ diff --git a/docs/project/images/path_variable.png b/docs/project/images/path_variable.png deleted file mode 100644 index 52f197a5e9..0000000000 Binary files a/docs/project/images/path_variable.png and /dev/null differ diff --git a/docs/project/images/proposal.png b/docs/project/images/proposal.png deleted file mode 100644 index 250781a70d..0000000000 Binary files a/docs/project/images/proposal.png and /dev/null differ diff --git a/docs/project/images/proposal.snagproj b/docs/project/images/proposal.snagproj deleted file mode 100644 index c9ad49d0e7..0000000000 Binary files a/docs/project/images/proposal.snagproj and /dev/null differ diff --git a/docs/project/images/pull_request_made.png b/docs/project/images/pull_request_made.png deleted file mode 100644 index d51a1a75fa..0000000000 Binary files a/docs/project/images/pull_request_made.png and /dev/null differ diff --git a/docs/project/images/red_notice.png b/docs/project/images/red_notice.png deleted file mode 100644 index 8839723a37..0000000000 Binary files a/docs/project/images/red_notice.png and /dev/null differ diff --git a/docs/project/images/register_email.png b/docs/project/images/register_email.png deleted file mode 100644 index 02ef4cd271..0000000000 Binary files a/docs/project/images/register_email.png and /dev/null differ diff --git a/docs/project/images/register_nic.png b/docs/project/images/register_nic.png deleted file mode 100644 index 16cf05a396..0000000000 Binary files a/docs/project/images/register_nic.png and /dev/null differ diff --git a/docs/project/images/three_running.png b/docs/project/images/three_running.png deleted file mode 100644 index cf6d25f2dc..0000000000 Binary files a/docs/project/images/three_running.png and /dev/null differ diff --git a/docs/project/images/three_terms.png b/docs/project/images/three_terms.png deleted file mode 100644 index 7caa6ac6e3..0000000000 Binary files a/docs/project/images/three_terms.png and /dev/null differ diff --git a/docs/project/images/to_from_pr.png b/docs/project/images/to_from_pr.png deleted file mode 100644 index 8dd6638e1b..0000000000 Binary files a/docs/project/images/to_from_pr.png and /dev/null differ diff --git a/docs/project/images/windows-env-vars.png b/docs/project/images/windows-env-vars.png deleted file mode 100644 index 68d00e9080..0000000000 Binary files a/docs/project/images/windows-env-vars.png and /dev/null differ diff --git a/docs/project/images/windows-mingw.png b/docs/project/images/windows-mingw.png deleted file mode 100644 index b1d15e6b1d..0000000000 Binary files a/docs/project/images/windows-mingw.png and /dev/null differ diff --git a/docs/project/make-a-contribution.md b/docs/project/make-a-contribution.md deleted file mode 100644 index 188a737957..0000000000 --- a/docs/project/make-a-contribution.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# Understand how to contribute - -Contributing is a process where you work with Docker maintainers and the -community to improve Docker. The maintainers are experienced contributors -who specialize in one or more Docker components. Maintainers play a big role -in reviewing contributions. - -There is a formal process for contributing. We try to keep our contribution -process simple so you'll want to contribute frequently. - - -## The basic contribution workflow - -In this guide, you work through Docker's basic contribution workflow by fixing a -single *beginner* issue in the `docker/docker` repository. The workflow -for fixing simple issues looks like this: - -![Simple process](images/existing_issue.png) - -All Docker repositories have code and documentation. You use this same workflow -for either content type. For example, you can find and fix doc or code issues. -Also, you can propose a new Docker feature or propose a new Docker tutorial. - -Some workflow stages do have slight differences for code or documentation -contributions. When you reach that point in the flow, we make sure to tell you. - - -## Where to go next - -Now that you know a little about the contribution process, go to the next section -to [find an issue you want to work on](find-an-issue.md). diff --git a/docs/project/review-pr.md b/docs/project/review-pr.md deleted file mode 100644 index 680a62ddd4..0000000000 --- a/docs/project/review-pr.md +++ /dev/null @@ -1,141 +0,0 @@ - - - -# Participate in the PR review - -Creating a pull request is nearly the end of the contribution process. At this -point, your code is reviewed both by our continuous integration (CI) systems and -by our maintainers. - -The CI system is an automated system. The maintainers are human beings that also -work on Docker. You need to understand and work with both the "bots" and the -"beings" to review your contribution. - - -## How we process your review - -First to review your pull request is Gordon. Gordon is fast. He checks your -pull request (PR) for common problems like a missing signature. If Gordon finds a -problem, he'll send an email through your GitHub user account: - -![Gordon](images/gordon.jpeg) - -Our build bot system starts building your changes while Gordon sends any emails. - -The build system double-checks your work by compiling your code with Docker's master -code. Building includes running the same tests you ran locally. If you forgot -to run tests or missed something in fixing problems, the automated build is our -safety check. - -After Gordon and the bots, the "beings" review your work. Docker maintainers look -at your pull request and comment on it. The shortest comment you might see is -`LGTM` which means **l**ooks-**g**ood-**t**o-**m**e. If you get an `LGTM`, that -is a good thing, you passed that review. - -For complex changes, maintainers may ask you questions or ask you to change -something about your submission. All maintainer comments on a PR go to the -email address associated with your GitHub account. Any GitHub user who -"participates" in a PR receives an email to. Participating means creating or -commenting on a PR. - -Our maintainers are very experienced Docker users and open source contributors. -So, they value your time and will try to work efficiently with you by keeping -their comments specific and brief. If they ask you to make a change, you'll -need to update your pull request with additional changes. - -## Update an existing pull request - -To update your existing pull request: - -1. Checkout the PR branch in your local `docker-fork` repository. - - This is the branch associated with your request. - -2. Change one or more files and then stage your changes. - - The command syntax is: - - git add - -3. Commit the change. - - $ git commit --amend - - Git opens an editor containing your last commit message. - -4. Adjust your last comment to reflect this new change. - - Added a new sentence per Anaud's suggestion - - Signed-off-by: Mary Anthony - - # Please enter the commit message for your changes. Lines starting - # with '#' will be ignored, and an empty message aborts the commit. - # On branch 11038-fix-rhel-link - # Your branch is up-to-date with 'origin/11038-fix-rhel-link'. - # - # Changes to be committed: - # modified: docs/installation/mac.md - # modified: docs/installation/rhel.md - -5. Force push the change to your origin. - - The command syntax is: - - git push -f origin - -6. Open your browser to your pull request on GitHub. - - You should see your pull request now contains your newly pushed code. - -7. Add a comment to your pull request. - - GitHub only notifies PR participants when you comment. For example, you can - mention that you updated your PR. Your comment alerts the maintainers that - you made an update. - -A change requires LGTMs from an absolute majority of an affected component's -maintainers. For example, if you change `docs/` and `registry/` code, an -absolute majority of the `docs/` and the `registry/` maintainers must approve -your PR. Once you get approval, we merge your pull request into Docker's -`master` code branch. - -## After the merge - -It can take time to see a merged pull request in Docker's official release. -A master build is available almost immediately though. Docker builds and -updates its development binaries after each merge to `master`. - -1. Browse to https://master.dockerproject.org/. - -2. Look for the binary appropriate to your system. - -3. Download and run the binary. - - You might want to run the binary in a container though. This - will keep your local host environment clean. - -4. View any documentation changes at docs.master.dockerproject.org. - -Once you've verified everything merged, feel free to delete your feature branch -from your fork. For information on how to do this, - -see the GitHub help on deleting branches. - -## Where to go next - -At this point, you have completed all the basic tasks in our contributors guide. -If you enjoyed contributing, let us know by completing another beginner -issue or two. We really appreciate the help. - -If you are very experienced and want to make a major change, go on to -[learn about advanced contributing](advanced-contributing.md). diff --git a/docs/project/set-up-dev-env.md b/docs/project/set-up-dev-env.md deleted file mode 100644 index c1fac8cf6d..0000000000 --- a/docs/project/set-up-dev-env.md +++ /dev/null @@ -1,426 +0,0 @@ - - -# Work with a development container - -In this section, you learn to develop like a member of Docker's core team. -The `docker` repository includes a `Dockerfile` at its root. This file defines -Docker's development environment. The `Dockerfile` lists the environment's -dependencies: system libraries and binaries, Go environment, Go dependencies, -etc. - -Docker's development environment is itself, ultimately a Docker container. -You use the `docker` repository and its `Dockerfile` to create a Docker image, -run a Docker container, and develop code in the container. Docker itself builds, -tests, and releases new Docker versions using this container. - -If you followed the procedures that -set up Git for contributing, you should have a fork of the `docker/docker` -repository. You also created a branch called `dry-run-test`. In this section, -you continue working with your fork on this branch. - -## Clean your host of Docker artifacts - -Docker developers run the latest stable release of the Docker software (with Docker Machine if their machine is Mac OS X). They clean their local -hosts of unnecessary Docker artifacts such as stopped containers or unused -images. Cleaning unnecessary artifacts isn't strictly necessary, but it is -good practice, so it is included here. - -To remove unnecessary artifacts: - -1. Verify that you have no unnecessary containers running on your host. - - $ docker ps - - You should see something similar to the following: - - - - - - - - - - - -
CONTAINER IDIMAGECOMMANDCREATEDSTATUSPORTSNAMES
- - There are no running containers on this host. If you have running but unused - containers, stop and then remove them with the `docker stop` and `docker rm` - commands. - -2. Verify that your host has no dangling images. - - $ docker images - - You should see something similar to the following: - - - - - - - - - -
REPOSITORYTAGIMAGE IDCREATEDVIRTUAL SIZE
- - This host has no images. You may have one or more _dangling_ images. A - dangling image is not used by a running container and is not an ancestor of - another image on your system. A fast way to remove dangling containers is - the following: - - $ docker rmi -f $(docker images -q -a -f dangling=true) - - This command uses `docker images` to list all images (`-a` flag) by numeric - IDs (`-q` flag) and filter them to find dangling images (`-f dangling=true`). - Then, the `docker rmi` command forcibly (`-f` flag) removes - the resulting list. To remove just one image, use the `docker rmi ID` - command. - - -## Build an image - -If you followed the last procedure, your host is clean of unnecessary images -and containers. In this section, you build an image from the Docker development -environment. - -1. Open a terminal. - - Mac users, use `docker-machine status your_vm_name` to make sure your VM is running. You - may need to run `eval "$(docker-machine env your_vm_name)"` to initialize your - shell environment. - -3. Change into the root of your forked repository. - - $ cd ~/repos/docker-fork - - If you are following along with this guide, you created a `dry-run-test` - branch when you set up Git for - contributing. - -4. Ensure you are on your `dry-run-test` branch. - - $ git checkout dry-run-test - - If you get a message that the branch doesn't exist, add the `-b` flag (git checkout -b dry-run-test) so the - command both creates the branch and checks it out. - -5. Compile your development environment container into an image. - - $ docker build -t dry-run-test . - - The `docker build` command returns informational message as it runs. The - first build may take a few minutes to create an image. Using the - instructions in the `Dockerfile`, the build may need to download source and - other images. A successful build returns a final status message similar to - the following: - - Successfully built 676815d59283 - -6. List your Docker images again. - - $ docker images - - You should see something similar to this: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REPOSTITORYTAGIMAGE IDCREATEDVIRTUAL SIZE
dry-run-testlatest663fbee70028About a minute ago
ubuntutrusty2d24f826cb162 days ago188.3 MB
ubuntutrusty-20150218.12d24f826cb162 days ago188.3 MB
ubuntu14.042d24f826cb162 days ago188.3 MB
ubuntu14.04.22d24f826cb162 days ago188.3 MB
ubuntulatest2d24f826cb162 days ago188.3 MB
- - Locate your new `dry-run-test` image in the list. You should also see a - number of `ubuntu` images. The build process creates these. They are the - ancestors of your new Docker development image. When you next rebuild your - image, the build process reuses these ancestors images if they exist. - - Keeping the ancestor images improves the build performance. When you rebuild - the child image, the build process uses the local ancestors rather than - retrieving them from the Hub. The build process gets new ancestors only if - Docker Hub has updated versions. - -## Start a container and run a test - -At this point, you have created a new Docker development environment image. Now, -you'll use this image to create a Docker container to develop in. Then, you'll -build and run a `docker` binary in your container. - -1. Open two additional terminals on your host. - - At this point, you'll have about three terminals open. - - ![Multiple terminals](images/three_terms.png) - - Mac OS X users, make sure you run `eval "$(docker-machine env your_vm_name)"` in - any new terminals. - -2. In a terminal, create a new container from your `dry-run-test` image. - - $ docker run --privileged --rm -ti dry-run-test /bin/bash - root@5f8630b873fe:/go/src/github.com/docker/docker# - - The command creates a container from your `dry-run-test` image. It opens an - interactive terminal (`-ti`) running a `/bin/bash` shell. The - `--privileged` flag gives the container access to kernel features and device - access. This flag allows you to run a container in a container. - Finally, the `-rm` flag instructs Docker to remove the container when you - exit the `/bin/bash` shell. - - The container includes the source of your image repository in the - `/go/src/github.com/docker/docker` directory. Try listing the contents to - verify they are the same as that of your `docker-fork` repo. - - ![List example](images/list_example.png) - - -3. Investigate your container bit. - - If you do a `go version` you'll find the `go` language is part of the - container. - - root@31ed86e9ddcf:/go/src/github.com/docker/docker# go version - go version go1.4.2 linux/amd64 - - Similarly, if you do a `docker version` you find the container - has no `docker` binary. - - root@31ed86e9ddcf:/go/src/github.com/docker/docker# docker version - bash: docker: command not found - - You will create one in the next steps. - -4. From the `/go/src/github.com/docker/docker` directory make a `docker` binary -with the `make.sh` script. - - root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh binary - - You only call `hack/make.sh` to build a binary _inside_ a Docker - development container as you are now. On your host, you'll use `make` - commands (more about this later). - - As it makes the binary, the `make.sh` script reports the build's progress. - When the command completes successfully, you should see the following - output: - - ---> Making bundle: binary (in bundles/1.5.0-dev/binary) - Created binary: /go/src/github.com/docker/docker/bundles/1.5.0-dev/binary/docker-1.5.0-dev - -5. List all the contents of the `binary` directory. - - root@5f8630b873fe:/go/src/github.com/docker/docker# ls bundles/1.5.0-dev/binary/ - docker docker-1.5.0-dev docker-1.5.0-dev.md5 docker-1.5.0-dev.sha256 - - You should see that `binary` directory, just as it sounds, contains the - made binaries. - - -6. Copy the `docker` binary to the `/usr/bin` of your container. - - root@5f8630b873fe:/go/src/github.com/docker/docker# cp bundles/1.5.0-dev/binary/docker /usr/bin - -7. Inside your container, check your Docker version. - - root@5f8630b873fe:/go/src/github.com/docker/docker# docker --version - Docker version 1.5.0-dev, build 6e728fb - - Inside the container you are running a development version. This is the version - on the current branch. It reflects the value of the `VERSION` file at the - root of your `docker-fork` repository. - -8. Start a `docker` daemon running inside your container. - - root@5f8630b873fe:/go/src/github.com/docker/docker# docker daemon -D - - The `-D` flag starts the daemon in debug mode. You'll find this useful - when debugging your code. - -9. Bring up one of the terminals on your local host. - - -10. List your containers and look for the container running the `dry-run-test` image. - - $ docker ps - - - - - - - - - - - - - - - - - - - - -
CONTAINER IDIMAGECOMMANDCREATEDSTATUSPORTSNAMES
474f07652525dry-run-test:latest"hack/dind /bin/bash14 minutes agoUp 14 minutestender_shockley
- - In this example, the container's name is `tender_shockley`; yours will be - different. - -11. From the terminal, start another shell on your Docker development container. - - $ docker exec -it tender_shockley bash - - At this point, you have two terminals both with a shell open into your - development container. One terminal is running a debug session. The other - terminal is displaying a `bash` prompt. - -12. At the prompt, test the Docker client by running the `hello-world` container. - - root@9337c96e017a:/go/src/github.com/docker/docker# docker run hello-world - - You should see the image load and return. Meanwhile, you - can see the calls made via the debug session in your other terminal. - - ![List example](images/three_running.png) - - -## Restart a container with your source - -At this point, you have experienced the "Docker inception" technique. That is, -you have: - -* built a Docker image from the Docker repository -* created and started a Docker development container from that image -* built a Docker binary inside of your Docker development container -* launched a `docker` daemon using your newly compiled binary -* called the `docker` client to run a `hello-world` container inside - your development container - -When you really get to developing code though, you'll want to iterate code -changes and builds inside the container. For that you need to mount your local -Docker repository source into your Docker container. Try that now. - -1. If you haven't already, exit out of BASH shells in your running Docker -container. - - If you have followed this guide exactly, exiting out your BASH shells stops - the running container. You can use the `docker ps` command to verify the - development container is stopped. All of your terminals should be at the - local host prompt. - -2. Choose a terminal and make sure you are in your `docker-fork` repository. - - $ pwd - /Users/mary/go/src/github.com/moxiegirl/docker-fork - - Your location will be different because it reflects your environment. - -3. Create a container using `dry-run-test`, but this time, mount your repository -onto the `/go` directory inside the container. - - $ docker run --privileged --rm -ti -v `pwd`:/go/src/github.com/docker/docker dry-run-test /bin/bash - - When you pass `pwd`, `docker` resolves it to your current directory. - -4. From inside the container, list your `binary` directory. - - root@074626fc4b43:/go/src/github.com/docker/docker# ls bundles/1.5.0-dev/binary - ls: cannot access binary: No such file or directory - - Your `dry-run-test` image does not retain any of the changes you made inside - the container. This is the expected behavior for a container. - -5. In a fresh terminal on your local host, change to the `docker-fork` root. - - $ cd ~/repos/docker-fork/ - -6. Create a fresh binary, but this time, use the `make` command. - - $ make BINDDIR=. binary - - The `BINDDIR` flag is only necessary on Mac OS X but it won't hurt to pass - it on Linux command line. The `make` command, like the `make.sh` script - inside the container, reports its progress. When the make succeeds, it - returns the location of the new binary. - - -7. Back in the terminal running the container, list your `binary` directory. - - root@074626fc4b43:/go/src/github.com/docker/docker# ls bundles/1.5.0-dev/binary - docker docker-1.5.0-dev docker-1.5.0-dev.md5 docker-1.5.0-dev.sha256 - - The compiled binaries created from your repository on your local host are - now available inside your running Docker development container. - -8. Repeat the steps you ran in the previous procedure. - - * copy the binary inside the development container using - `cp bundles/1.5.0-dev/binary/docker /usr/bin` - * start `docker daemon -D` to launch the Docker daemon inside the container - * run `docker ps` on local host to get the development container's name - * connect to your running container `docker exec -it container_name bash` - * use the `docker run hello-world` command to create and run a container - inside your development container - -## Where to go next - -Congratulations, you have successfully achieved Docker inception. At this point, -you've set up your development environment and verified almost all the essential -processes you need to contribute. Of course, before you start contributing, -[you'll need to learn one more piece of the development environment, the test -framework](test-and-docs.md). diff --git a/docs/project/set-up-git.md b/docs/project/set-up-git.md deleted file mode 100644 index 0202751129..0000000000 --- a/docs/project/set-up-git.md +++ /dev/null @@ -1,248 +0,0 @@ - - -# Configure Git for contributing - -Work through this page to configure Git and a repository you'll use throughout -the Contributor Guide. The work you do further in the guide, depends on the work -you do here. - -## Fork and clone the Docker code - -Before contributing, you first fork the Docker code repository. A fork copies -a repository at a particular point in time. GitHub tracks for you where a fork -originates. - -As you make contributions, you change your fork's code. When you are ready, -you make a pull request back to the original Docker repository. If you aren't -familiar with this workflow, don't worry, this guide walks you through all the -steps. - -To fork and clone Docker: - -1. Open a browser and log into GitHub with your account. - -2. Go to the docker/docker repository. - -3. Click the "Fork" button in the upper right corner of the GitHub interface. - - ![Branch Signature](images/fork_docker.png) - - GitHub forks the repository to your GitHub account. The original - `docker/docker` repository becomes a new fork `YOUR_ACCOUNT/docker` under - your account. - -4. Copy your fork's clone URL from GitHub. - - GitHub allows you to use HTTPS or SSH protocols for clones. You can use the - `git` command line or clients like Subversion to clone a repository. - - ![Copy clone URL](images/copy_url.png) - - This guide assume you are using the HTTPS protocol and the `git` command - line. If you are comfortable with SSH and some other tool, feel free to use - that instead. You'll need to convert what you see in the guide to what is - appropriate to your tool. - -5. Open a terminal window on your local host and change to your home directory. - - $ cd ~ - - In Windows, you'll work in your Docker Quickstart Terminal window instead of - Powershell or a `cmd` window. - -6. Create a `repos` directory. - - $ mkdir repos - -7. Change into your `repos` directory. - - $ cd repos - -5. Clone the fork to your local host into a repository called `docker-fork`. - - $ git clone https://github.com/moxiegirl/docker.git docker-fork - - Naming your local repo `docker-fork` should help make these instructions - easier to follow; experienced coders don't typically change the name. - -6. Change directory into your new `docker-fork` directory. - - $ cd docker-fork - - Take a moment to familiarize yourself with the repository's contents. List - the contents. - -## Set your signature and an upstream remote - -When you contribute to Docker, you must certify you agree with the -Developer Certificate of Origin. -You indicate your agreement by signing your `git` commits like this: - - Signed-off-by: Pat Smith - -To create a signature, you configure your username and email address in Git. -You can set these globally or locally on just your `docker-fork` repository. -You must sign with your real name. We don't accept anonymous contributions or -contributions through pseudonyms. - -As you change code in your fork, you'll want to keep it in sync with the changes -others make in the `docker/docker` repository. To make syncing easier, you'll -also add a _remote_ called `upstream` that points to `docker/docker`. A remote -is just another project version hosted on the internet or network. - -To configure your username, email, and add a remote: - -1. Change to the root of your `docker-fork` repository. - - $ cd docker-fork - -2. Set your `user.name` for the repository. - - $ git config --local user.name "FirstName LastName" - -3. Set your `user.email` for the repository. - - $ git config --local user.email "emailname@mycompany.com" - -4. Set your local repo to track changes upstream, on the `docker` repository. - - $ git remote add upstream https://github.com/docker/docker.git - -7. Check the result in your `git` configuration. - - $ git config --local -l - core.repositoryformatversion=0 - core.filemode=true - core.bare=false - core.logallrefupdates=true - remote.origin.url=https://github.com/moxiegirl/docker.git - remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* - branch.master.remote=origin - branch.master.merge=refs/heads/master - user.name=Mary Anthony - user.email=mary@docker.com - remote.upstream.url=https://github.com/docker/docker.git - remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/* - - To list just the remotes use: - - $ git remote -v - origin https://github.com/moxiegirl/docker.git (fetch) - origin https://github.com/moxiegirl/docker.git (push) - upstream https://github.com/docker/docker.git (fetch) - upstream https://github.com/docker/docker.git (push) - -## Create and push a branch - -As you change code in your fork, make your changes on a repository branch. -The branch name should reflect what you are working on. In this section, you -create a branch, make a change, and push it up to your fork. - -This branch is just for testing your config for this guide. The changes are part -of a dry run, so the branch name will be dry-run-test. To create and push -the branch to your fork on GitHub: - -1. Open a terminal and go to the root of your `docker-fork`. - - $ cd docker-fork - -2. Create a `dry-run-test` branch. - - $ git checkout -b dry-run-test - - This command creates the branch and switches the repository to it. - -3. Verify you are in your new branch. - - $ git branch - * dry-run-test - master - - The current branch has an * (asterisk) marker. So, these results shows you - are on the right branch. - -4. Create a `TEST.md` file in the repository's root. - - $ touch TEST.md - -5. Edit the file and add your email and location. - - ![Add your information](images/contributor-edit.png) - - You can use any text editor you are comfortable with. - -6. Save and close the file. - -7. Check the status of your branch. - - $ git status - On branch dry-run-test - Untracked files: - (use "git add ..." to include in what will be committed) - - TEST.md - - nothing added to commit but untracked files present (use "git add" to track) - - You've only changed the one file. It is untracked so far by git. - -8. Add your file. - - $ git add TEST.md - - That is the only _staged_ file. Stage is fancy word for work that Git is - tracking. - -9. Sign and commit your change. - - $ git commit -s -m "Making a dry run test." - [dry-run-test 6e728fb] Making a dry run test - 1 file changed, 1 insertion(+) - create mode 100644 TEST.md - - Commit messages should have a short summary sentence of no more than 50 - characters. Optionally, you can also include a more detailed explanation - after the summary. Separate the summary from any explanation with an empty - line. - -8. Push your changes to GitHub. - - $ git push --set-upstream origin dry-run-test - Username for 'https://github.com': moxiegirl - Password for 'https://moxiegirl@github.com': - - Git prompts you for your GitHub username and password. Then, the command - returns a result. - - Counting objects: 13, done. - Compressing objects: 100% (2/2), done. - Writing objects: 100% (3/3), 320 bytes | 0 bytes/s, done. - Total 3 (delta 1), reused 0 (delta 0) - To https://github.com/moxiegirl/docker.git - * [new branch] dry-run-test -> dry-run-test - Branch dry-run-test set up to track remote branch dry-run-test from origin. - -9. Open your browser to GitHub. - -10. Navigate to your Docker fork. - -11. Make sure the `dry-run-test` branch exists, that it has your commit, and the -commit is signed. - - ![Branch Signature](images/branch-sig.png) - -## Where to go next - -Congratulations, you have finished configuring both your local host environment -and Git for contributing. In the next section you'll [learn how to set up and -work in a Docker development container](set-up-dev-env.md). diff --git a/docs/project/software-req-win.md b/docs/project/software-req-win.md deleted file mode 100644 index 1eae96c9aa..0000000000 --- a/docs/project/software-req-win.md +++ /dev/null @@ -1,265 +0,0 @@ - - - -# Get the required software for Windows - -This page explains how to get the software you need to use a a Windows Server -2012 or Windows 8 machine for Docker development. Before you begin contributing -you must have: - -- a GitHub account -- Git for Windows (msysGit) -- TDM-GCC, a compiler suite for Windows -- MinGW (tar and xz) -- Go language - -> **Note**: This installation procedure refers to the `C:\` drive. If you system's main drive -is `D:\` you'll need to substitute that in where appropriate in these -instructions. - -### Get a GitHub account - -To contribute to the Docker project, you will need a GitHub account. A free account is -fine. All the Docker project repositories are public and visible to everyone. - -You should also have some experience using both the GitHub application and `git` -on the command line. - -## Install Git for Windows - -Git for Windows includes several tools including msysGit, which is a build -environment. The environment contains the tools you need for development such as -Git and a Git Bash shell. - -1. Browse to the [Git for Windows](https://msysgit.github.io/) download page. - -2. Click **Download**. - - Windows prompts you to save the file to your machine. - -3. Run the saved file. - - The system displays the **Git Setup** wizard. - -4. Click the **Next** button to move through the wizard and accept all the defaults. - -5. Click **Finish** when you are done. - -## Installing TDM-GCC - -TDM-GCC is a compiler suite for Windows. You'll use this suite to compile the -Docker Go code as you develop. - -1. Browse to - [tdm-gcc download page](http://tdm-gcc.tdragon.net/download). - -2. Click on the latest 64-bit version of the package. - - Windows prompts you to save the file to your machine - -3. Set up the suite by running the downloaded file. - - The system opens the **TDM-GCC Setup** wizard. - -4. Click **Create**. - -5. Click the **Next** button to move through the wizard and accept all the defaults. - -6. Click **Finish** when you are done. - - -## Installing MinGW (tar and xz) - -MinGW is a minimalist port of the GNU Compiler Collection (GCC). In this -procedure, you first download and install the MinGW installation manager. Then, -you use the manager to install the `tar` and `xz` tools from the collection. - -1. Browse to MinGW - [SourceForge](http://sourceforge.net/projects/mingw/). - -2. Click **Download**. - - Windows prompts you to save the file to your machine - -3. Run the downloaded file. - - The system opens the **MinGW Installation Manager Setup Tool** - -4. Choose **Install** install the MinGW Installation Manager. - -5. Press **Continue**. - - The system installs and then opens the MinGW Installation Manager. - -6. Press **Continue** after the install completes to open the manager. - -7. Select **All Packages > MSYS Base System** from the left hand menu. - - The system displays the available packages. - -8. Click on the the **msys-tar bin** package and choose **Mark for Installation**. - -9. Click on the **msys-xz bin** package and choose **Mark for Installation**. - -10. Select **Installation > Apply Changes**, to install the selected packages. - - The system displays the **Schedule of Pending Actions Dialog**. - - ![windows-mingw](images/windows-mingw.png) - -11. Press **Apply** - - MingGW installs the packages for you. - -12. Close the dialog and the MinGW Installation Manager. - - -## Set up your environment variables - -You'll need to add the compiler to your `Path` environment variable. - -1. Open the **Control Panel**. - -2. Choose **System and Security > System**. - -3. Click the **Advanced system settings** link in the sidebar. - - The system opens the **System Properties** dialog. - -3. Select the **Advanced** tab. - -4. Click **Environment Variables**. - - The system opens the **Environment Variables dialog** dialog. - -5. Locate the **System variables** area and scroll to the **Path** - variable. - - ![windows-mingw](images/path_variable.png) - -6. Click **Edit** to edit the variable (you can also double-click it). - - The system opens the **Edit System Variable** dialog. - -7. Make sure the `Path` includes `C:\TDM-GCC64\bin` - - ![include gcc](images/include_gcc.png) - - If you don't see `C:\TDM-GCC64\bin`, add it. - -8. Press **OK** to close this dialog. - -9. Press **OK** twice to close out of the remaining dialogs. - -## Install Go and cross-compile it - -In this section, you install the Go language. Then, you build the source so that it can cross-compile for `linux/amd64` architectures. - -1. Open [Go Language download](http://golang.org/dl/) page in your browser. - -2. Locate and click the latest `.msi` installer. - - The system prompts you to save the file. - -3. Run the installer. - - The system opens the **Go Programming Language Setup** dialog. - -4. Select all the defaults to install. - -5. Press **Finish** to close the installation dialog. - -6. Start a command prompt. - -7. Change to the Go `src` directory. - - cd c:\Go\src - -8. Set the following Go variables - - c:\Go\src> set GOOS=linux - c:\Go\src> set GOARCH=amd64 - -9. Compile the source. - - c:\Go\src> make.bat - - Compiling the source also adds a number of variables to your Windows environment. - -## Get the Docker repository - -In this step, you start a Git `bash` terminal and get the Docker source code -from GitHub. - -1. Locate the **Git Bash** program and start it. - - Recall that **Git Bash** came with the Git for Windows installation. **Git - Bash** just as it sounds allows you to run a Bash terminal on Windows. - - ![Git Bash](images/git_bash.png) - -2. Change to the root directory. - - $ cd /c/ - -3. Make a `gopath` directory. - - $ mkdir gopath - -4. Go get the `docker/docker` repository. - - $ go.exe get github.com/docker/docker package github.com/docker/docker - imports github.com/docker/docker - imports github.com/docker/docker: no buildable Go source files in C:\gopath\src\github.com\docker\docker - - In the next steps, you create environment variables for you Go paths. - -5. Open the **Control Panel** on your system. - -6. Choose **System and Security > System**. - -7. Click the **Advanced system settings** link in the sidebar. - - The system opens the **System Properties** dialog. - -8. Select the **Advanced** tab. - -9. Click **Environment Variables**. - - The system opens the **Environment Variables dialog** dialog. - -10. Locate the **System variables** area and scroll to the **Path** - variable. - -11. Click **New**. - - Now you are going to create some new variables. These paths you'll create in the next procedure; but you can set them now. - -12. Enter `GOPATH` for the **Variable Name**. - -13. For the **Variable Value** enter the following: - - C:\gopath;C:\gopath\src\github.com\docker\docker\vendor - - -14. Press **OK** to close this dialog. - - The system adds `GOPATH` to the list of **System Variables**. - -15. Press **OK** twice to close out of the remaining dialogs. - - -## Where to go next - -In the next section, you'll [learn how to set up and configure Git for -contributing to Docker](set-up-git.md). \ No newline at end of file diff --git a/docs/project/software-required.md b/docs/project/software-required.md deleted file mode 100644 index c82ae13de3..0000000000 --- a/docs/project/software-required.md +++ /dev/null @@ -1,98 +0,0 @@ - - -# Get the required software for Linux or OS X - -This page explains how to get the software you need to use a Linux or OS X -machine for Docker development. Before you begin contributing you must have: - -* a GitHub account -* `git` -* `make` -* `docker` - -You'll notice that `go`, the language that Docker is written in, is not listed. -That's because you don't need it installed; Docker's development environment -provides it for you. You'll learn more about the development environment later. - -### Get a GitHub account - -To contribute to the Docker project, you will need a GitHub account. A free account is -fine. All the Docker project repositories are public and visible to everyone. - -You should also have some experience using both the GitHub application and `git` -on the command line. - -### Install git - -Install `git` on your local system. You can check if `git` is on already on your -system and properly installed with the following command: - - $ git --version - - -This documentation is written using `git` version 2.2.2. Your version may be -different depending on your OS. - -### Install make - -Install `make`. You can check if `make` is on your system with the following -command: - - $ make -v - -This documentation is written using GNU Make 3.81. Your version may be different -depending on your OS. - -### Install or upgrade Docker - -If you haven't already, install the Docker software using the -instructions for your operating system. -If you have an existing installation, check your version and make sure you have -the latest Docker. - -To check if `docker` is already installed on Linux: - - $ docker --version - Docker version 1.5.0, build a8a31ef - -On Mac OS X or Windows, you should have installed Docker Toolbox which includes -Docker. You'll need to verify both Docker Machine and Docker. This -documentation was written on OS X using the following versions. - - $ docker-machine --version - docker-machine version 0.3.0 (0a251fe) - - $ docker --version - Docker version 1.7.0, build a8a31ef - -## Linux users and sudo - -This guide assumes you have added your user to the `docker` group on your system. -To check, list the group's contents: - - $ getent group docker - docker:x:999:ubuntu - -If the command returns no matches, you have two choices. You can preface this -guide's `docker` commands with `sudo` as you work. Alternatively, you can add -your user to the `docker` group as follows: - - $ sudo usermod -aG docker ubuntu - -You must log out and log back in for this modification to take effect. - - -## Where to go next - -In the next section, you'll [learn how to set up and configure Git for -contributing to Docker](set-up-git.md). diff --git a/docs/project/test-and-docs.md b/docs/project/test-and-docs.md deleted file mode 100644 index 3bfccea2eb..0000000000 --- a/docs/project/test-and-docs.md +++ /dev/null @@ -1,331 +0,0 @@ - - -# Run tests and test documentation - -Contributing includes testing your changes. If you change the Docker code, you -may need to add a new test or modify an existing one. Your contribution could -even be adding tests to Docker. For this reason, you need to know a little -about Docker's test infrastructure. - -Many contributors contribute documentation only. Or, a contributor makes a code -contribution that changes how Docker behaves and that change needs -documentation. For these reasons, you also need to know how to build, view, and -test the Docker documentation. - -In this section, you run tests in the `dry-run-test` branch of your Docker -fork. If you have followed along in this guide, you already have this branch. -If you don't have this branch, you can create it or simply use another of your -branches. - -## Understand testing at Docker - -Docker tests use the Go language's test framework. In this framework, files -whose names end in `_test.go` contain test code; you'll find test files like -this throughout the Docker repo. Use these files for inspiration when writing -your own tests. For information on Go's test framework, see Go's testing package -documentation and the go test help. - -You are responsible for _unit testing_ your contribution when you add new or -change existing Docker code. A unit test is a piece of code that invokes a -single, small piece of code ( _unit of work_ ) to verify the unit works as -expected. - -Depending on your contribution, you may need to add _integration tests_. These -are tests that combine two or more work units into one component. These work -units each have unit tests and then, together, integration tests that test the -interface between the components. The `integration` and `integration-cli` -directories in the Docker repository contain integration test code. - -Testing is its own specialty. If you aren't familiar with testing techniques, -there is a lot of information available to you on the Web. For now, you should -understand that, the Docker maintainers may ask you to write a new test or -change an existing one. - -### Run tests on your local host - -Before submitting any code change, you should run the entire Docker test suite. -The `Makefile` contains a target for the entire test suite. The target's name -is simply `test`. The `Makefile` contains several targets for testing: - - - - - - - - - - - - - - - - - - - - - - - -
TargetWhat this target does
testRun all the tests.
test-unitRun just the unit tests.
test-integration-cliRun the test for the integration command line interface.
test-docker-pyRun the tests for Docker API client.
- -Run the entire test suite on your current repository: - -1. Open a terminal on your local host. - -2. Change to the root your Docker repository. - - $ cd docker-fork - -3. Make sure you are in your development branch. - - $ git checkout dry-run-test - -4. Run the `make test` command. - - $ make test - - This command does several things, it creates a container temporarily for - testing. Inside that container, the `make`: - - * creates a new binary - * cross-compiles all the binaries for the various operating systems - * runs all the tests in the system - - It can take approximate one hour to run all the tests. The time depends - on your host performance. The default timeout is 60 minutes, which is - defined in hack/make.sh(${TIMEOUT:=60m}). You can modify the timeout - value on the basis of your host performance. When they complete - successfully, you see the output concludes with something like this: - - - PASS: docker_cli_pull_test.go:133: DockerHubPullSuite.TestPullClientDisconnect 1.127s - PASS: docker_cli_pull_test.go:16: DockerHubPullSuite.TestPullFromCentralRegistry 1.049s - PASS: docker_cli_pull_test.go:65: DockerHubPullSuite.TestPullFromCentralRegistryImplicitRefParts 9.795s - PASS: docker_cli_pull_test.go:42: DockerHubPullSuite.TestPullNonExistingImage 2.158s - PASS: docker_cli_pull_test.go:92: DockerHubPullSuite.TestPullScratchNotAllowed 0.044s - OK: 918 passed, 13 skipped - PASS - coverage: 72.9% of statements - ok github.com/docker/docker/integration-cli 1638.553s - ---> Making bundle: .integration-daemon-stop (in bundles/1.9.0-dev/test-integration-cli) - ++++ cat bundles/1.9.0-dev/test-integration-cli/docker.pid - +++ kill 9453 - +++ /etc/init.d/apparmor stop - * Clearing AppArmor profiles cache - ...done. - All profile caches have been cleared, but no profiles have been unloaded. - Unloading profiles will leave already running processes permanently - unconfined, which can lead to unexpected situations. - - To set a process to complain mode, use the command line tool - 'aa-complain'. To really tear down all profiles, run the init script - with the 'teardown' option." - - ---> Making bundle: test-docker-py (in bundles/1.9.0-dev/test-docker-py) - ---> Making bundle: .integration-daemon-start (in bundles/1.9.0-dev/test-docker-py) - +++ /etc/init.d/apparmor start - * Starting AppArmor profiles - Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd - ...done. - +++ exec docker daemon --debug --host unix:///go/src/github.com/docker/docker/bundles/1.9.0-dev/test-docker-py/docker.sock --storage-driver overlay --exec-driver native --pidfile bundles/1.9.0-dev/test-docker-py/docker.pid --userland-proxy=true - ..............s..............s...................................... - ---------------------------------------------------------------------- - Ran 68 tests in 79.135s - - -### Run test targets inside the development container - -If you are working inside a Docker development container, you use the -`hack/make.sh` script to run tests. The `hack/make.sh` script doesn't -have a single target that runs all the tests. Instead, you provide a single -command line with multiple targets that does the same thing. - -Try this now. - -1. Open a terminal and change to the `docker-fork` root. - -2. Start a Docker development image. - - If you are following along with this guide, you should have a - `dry-run-test` image. - - $ docker run --privileged --rm -ti -v `pwd`:/go/src/github.com/docker/docker dry-run-test /bin/bash - -3. Run the tests using the `hack/make.sh` script. - - root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh dynbinary binary cross test-unit test-integration-cli test-docker-py - - The tests run just as they did within your local host. - - -Of course, you can also run a subset of these targets too. For example, to run -just the unit tests: - - root@5f8630b873fe:/go/src/github.com/docker/docker# hack/make.sh dynbinary binary cross test-unit - -Most test targets require that you build these precursor targets first: -`dynbinary binary cross` - - -## Running individual or multiple named tests - -### Unit tests - -We use golang standard [testing](https://golang.org/pkg/testing/) -package or [gocheck](https://labix.org/gocheck) for our unit tests. - -You can use the `TESTDIRS` environment variable to run unit tests for -a single package. - - $ TESTDIRS='opts' make test-unit - -You can also use the `TESTFLAGS` environment variable to run a single test. The -flag's value is passed as arguments to the `go test` command. For example, from -your local host you can run the `TestBuild` test with this command: - - $ TESTFLAGS='-test.run ^TestValidateIPAddress$' make test-unit - -On unit tests, it's better to use `TESTFLAGS` in combination with -`TESTDIRS` to make it quicker to run a specific test. - - $ TESTDIRS='opts' TESTFLAGS='-test.run ^TestValidateIPAddress$' make test-unit - -### Integration tests - -We use [gocheck](https://labix.org/gocheck) for our integration-cli tests. -You can use the `TESTFLAGS` environment variable to run a single test. The -flag's value is passed as arguments to the `go test` command. For example, from -your local host you can run the `TestBuild` test with this command: - - $ TESTFLAGS='-check.f DockerSuite.TestBuild*' make test-integration-cli - -To run the same test inside your Docker development container, you do this: - - root@5f8630b873fe:/go/src/github.com/docker/docker# TESTFLAGS='-check.f TestBuild*' hack/make.sh binary test-integration-cli - -## Testing the Windows binary against a Linux daemon - -This explains how to test the Windows binary on a Windows machine set up as a -development environment. The tests will be run against a docker daemon -running on a remote Linux machine. You'll use **Git Bash** that came with the -Git for Windows installation. **Git Bash**, just as it sounds, allows you to -run a Bash terminal on Windows. - -1. If you don't have one open already, start a Git Bash terminal. - - ![Git Bash](images/git_bash.png) - -2. Change to the `docker` source directory. - - $ cd /c/gopath/src/github.com/docker/docker - -3. Set `DOCKER_REMOTE_DAEMON` as follows: - - $ export DOCKER_REMOTE_DAEMON=1 - -4. Set `DOCKER_TEST_HOST` to the `tcp://IP_ADDRESS:2376` value; substitute your -Linux machines actual IP address. For example: - - $ export DOCKER_TEST_HOST=tcp://213.124.23.200:2376 - -5. Make the binary and run the tests: - - $ hack/make.sh binary test-integration-cli - - Some tests are skipped on Windows for various reasons. You can see which - tests were skipped by re-running the make and passing in the - `TESTFLAGS='-test.v'` value. For example - - $ TESTFLAGS='-test.v' hack/make.sh binary test-integration-cli - - Should you wish to run a single test such as one with the name - 'TestExample', you can pass in `TESTFLAGS='-check.f TestExample'`. For - example - - $TESTFLAGS='-check.f TestExample' hack/make.sh binary test-integration-cli - -You can now choose to make changes to the Docker source or the tests. If you -make any changes just run these commands again. - - -## Build and test the documentation - -The Docker documentation source files are under `docs`. The content is -written using extended Markdown. We use the static generator MkDocs to build Docker's -documentation. Of course, you don't need to install this generator -to build the documentation, it is included with container. - -You should always check your documentation for grammar and spelling. The best -way to do this is with an online grammar checker. - -When you change a documentation source file, you should test your change -locally to make sure your content is there and any links work correctly. You -can build the documentation from the local host. The build starts a container -and loads the documentation into a server. As long as this container runs, you -can browse the docs. - -1. In a terminal, change to the root of your `docker-fork` repository. - - $ cd ~/repos/docker-fork - -2. Make sure you are in your feature branch. - - $ git status - On branch dry-run-test - Your branch is up-to-date with 'origin/dry-run-test'. - nothing to commit, working directory clean - -3. Build the documentation. - - $ make docs - - When the build completes, you'll see a final output message similar to the - following: - - Successfully built ee7fe7553123 - docker run --rm -it -e AWS_S3_BUCKET -e NOCACHE -p 8000:8000 "docker-docs:dry-run-test" mkdocs serve - Running at: http://0.0.0.0:8000/ - Live reload enabled. - Hold ctrl+c to quit. - -4. Enter the URL in your browser. - - If you are using Docker Machine, replace the default localhost address - (0.0.0.0) with your DOCKERHOST value. You can get this value at any time by - entering `docker-machine ip ` at the command line. - -5. Once in the documentation, look for the red notice to verify you are seeing the correct build. - - ![Beta documentation](images/red_notice.png) - -6. Navigate to your new or changed document. - -7. Review both the content and the links. - -8. Return to your terminal and exit out of the running documentation container. - - -## Where to go next - -Congratulations, you have successfully completed the basics you need to -understand the Docker test framework. In the next steps, you use what you have -learned so far to [contribute to Docker by working on an -issue](make-a-contribution.md). diff --git a/docs/project/who-written-for.md b/docs/project/who-written-for.md deleted file mode 100644 index 5ab409d266..0000000000 --- a/docs/project/who-written-for.md +++ /dev/null @@ -1,63 +0,0 @@ - - -# README first - -This section of the documentation contains a guide for Docker users who want to -contribute code or documentation to the Docker project. As a community, we -share rules of behavior and interaction. Make sure you are familiar with the community guidelines before continuing. - -## Where and what you can contribute - -The Docker project consists of not just one but several repositories on GitHub. -So, in addition to the `docker/docker` repository, there is the -`docker/compose` repo, the `docker/machine` repo, and several more. -Contribute to any of these and you contribute to the Docker project. - -Not all Docker repositories use the Go language. Also, each repository has its -own focus area. So, if you are an experienced contributor, think about -contributing to a Docker repository that has a language or a focus area you are -familiar with. - -If you are new to the open source community, to Docker, or to formal -programming, you should start out contributing to the `docker/docker` -repository. Why? Because this guide is written for that repository specifically. - -Finally, code or documentation isn't the only way to contribute. You can report -an issue, add to discussions in our community channel, write a blog post, or -take a usability test. You can even propose your own type of contribution. -Right now we don't have a lot written about this yet, so just email - if this type of contributing interests you. - -## A turtle is involved - -![Gordon](images/gordon.jpeg) - -Enough said. - -## How to use this guide - -This is written for the distracted, the overworked, the sloppy reader with fair -`git` skills and a failing memory for the GitHub GUI. The guide attempts to -explain how to use the Docker environment as precisely, predictably, and -procedurally as possible. - -Users who are new to the Docker development environment should start by setting -up their environment. Then, they should try a simple code change. After that, -you should find something to work on or propose at totally new change. - -If you are a programming prodigy, you still may find this documentation useful. -Please feel free to skim past information you find obvious or boring. - -## How to get started - -Start by [getting the software you need to contribute](software-required.md). diff --git a/docs/project/work-issue.md b/docs/project/work-issue.md deleted file mode 100644 index 3f737fef11..0000000000 --- a/docs/project/work-issue.md +++ /dev/null @@ -1,200 +0,0 @@ - - - -# Work on your issue - -The work you do for your issue depends on the specific issue you picked. -This section gives you a step-by-step workflow. Where appropriate, it provides -command examples. - -However, this is a generalized workflow, depending on your issue you may repeat -steps or even skip some. How much time the work takes depends on you --- you -could spend days or 30 minutes of your time. - -## How to work on your local branch - -Follow this workflow as you work: - -1. Review the appropriate style guide. - - If you are changing code, review the coding style guide. Changing documentation? Review the - documentation style guide. - -2. Make changes in your feature branch. - - Your feature branch you created in the last section. Here you use the - development container. If you are making a code change, you can mount your - source into a development container and iterate that way. For documentation - alone, you can work on your local host. - - Make sure you don't change files in the `vendor` directory and its - subdirectories; they contain third-party dependency code. Review if you forgot the details of - working with a container. - - -3. Test your changes as you work. - - If you have followed along with the guide, you know the `make test` target - runs the entire test suite and `make docs` builds the documentation. If you - forgot the other test targets, see the documentation for testing both code and - documentation. - -4. For code changes, add unit tests if appropriate. - - If you add new functionality or change existing functionality, you should - add a unit test also. Use the existing test files for inspiration. Aren't - sure if you need tests? Skip this step; you can add them later in the - process if necessary. - -5. Format your source files correctly. - - - - - - - - - - - - - - - - - - -
File typeHow to format
.go -

- Format .go files using the gofmt command. - For example, if you edited the `docker.go` file you would format the file - like this: -

-

$ gofmt -s -w docker.go

-

- Most file editors have a plugin to format for you. Check your editor's - documentation. -

-
.md and non-.go filesWrap lines to 80 characters.
- -6. List your changes. - - $ git status - On branch 11038-fix-rhel-link - Changes not staged for commit: - (use "git add ..." to update what will be committed) - (use "git checkout -- ..." to discard changes in working directory) - - modified: docs/installation/mac.md - modified: docs/installation/rhel.md - - The `status` command lists what changed in the repository. Make sure you see - the changes you expect. - -7. Add your change to Git. - - $ git add docs/installation/mac.md - $ git add docs/installation/rhel.md - - -8. Commit your changes making sure you use the `-s` flag to sign your work. - - $ git commit -s -m "Fixing RHEL link" - -9. Push your change to your repository. - - $ git push origin 11038-fix-rhel-link - Username for 'https://github.com': moxiegirl - Password for 'https://moxiegirl@github.com': - Counting objects: 60, done. - Compressing objects: 100% (7/7), done. - Writing objects: 100% (7/7), 582 bytes | 0 bytes/s, done. - Total 7 (delta 6), reused 0 (delta 0) - To https://github.com/moxiegirl/docker.git - * [new branch] 11038-fix-rhel-link -> 11038-fix-rhel-link - Branch 11038-fix-rhel-link set up to track remote branch 11038-fix-rhel-link from origin. - -## Review your branch on GitHub - -After you push a new branch, you should verify it on GitHub: - -1. Open your browser to GitHub. - -2. Go to your Docker fork. - -3. Select your branch from the dropdown. - - ![Find branch](images/locate_branch.png) - -4. Use the "Compare" button to compare the differences between your branch and master. - - Depending how long you've been working on your branch, your branch maybe - behind Docker's upstream repository. - -5. Review the commits. - - Make sure your branch only shows the work you've done. - -## Pull and rebase frequently - -You should pull and rebase frequently as you work. - -1. Return to the terminal on your local machine and checkout your - feature branch in your local `docker-fork` repository. - -2. Fetch any last minute changes from `docker/docker`. - - $ git fetch upstream master - From github.com:docker/docker - * branch master -> FETCH_HEAD - -3. Start an interactive rebase. - - $ git rebase -i upstream/master - -4. Rebase opens an editor with a list of commits. - - pick 1a79f55 Tweak some of the other text for grammar - pick 53e4983 Fix a link - pick 3ce07bb Add a new line about RHEL - -5. Replace the `pick` keyword with `squash` on all but the first commit. - - pick 1a79f55 Tweak some of the other text for grammar - squash 53e4983 Fix a link - squash 3ce07bb Add a new line about RHEL - - After you save the changes and quit from the editor, git starts - the rebase, reporting the progress along the way. Sometimes - your changes can conflict with the work of others. If git - encounters a conflict, it stops the rebase, and prints guidance - for how to correct the conflict. - -6. Edit and save your commit message. - - $ git commit -s - - Make sure your message includes your signature. - -7. Force push any changes to your fork on GitHub. - - $ git push -f origin 11038-fix-rhel-link - - -## Where to go next - -At this point, you should understand how to work on an issue. In the next -section, you [learn how to make a pull request](create-pr.md).