CONTRIBUTING.md
760736b3
 # Contributing to Docker
 
933f207f
 Want to hack on Docker? Awesome!  We have a contributor's guide that explains
 [setting up a Docker development environment and the contribution
 process](https://docs.docker.com/project/who-written-for/). 
 
add13cb7
 ![Contributors guide](docs/sources/static_files/contributors.png)
933f207f
 
 This page contains information about reporting issues as well as some tips and
 guidelines useful to experienced open source contributors. Finally, make sure
 you read our [community guidelines](#docker-community-guidelines) before you
 start participating.
760736b3
 
52db7b8c
 ## Topics
 
543127e2
 * [Reporting Security Issues](#reporting-security-issues)
52db7b8c
 * [Design and Cleanup Proposals](#design-and-cleanup-proposals)
933f207f
 * [Reporting Issues](#reporting-other-issues)
 * [Quick Contribution Tips and Guidelines](#quick-contribution-tips-and-guidelines)
8891bb52
 * [Community Guidelines](#docker-community-guidelines)
52db7b8c
 
933f207f
 ## Reporting security issues
52db7b8c
 
933f207f
 The Docker maintainers take security seriously. If you discover a security
 issue, please bring it to their attention right away!
52db7b8c
 
933f207f
 Please **DO NOT** file a public issue, instead send your report privately to
 [security@docker.com](mailto:security@docker.com), 
52db7b8c
 
933f207f
 Security reports are greatly appreciated and we will publicly thank you for it.
 We also like to send gifts—if you're into Docker schwag make sure to let
 us know We currently do not offer a paid security bounty program, but are not
 ruling it out in the future.
52db7b8c
 
 
933f207f
 ## Reporting other issues
e4ae44b8
 
2d688b0a
 A great way to contribute to the project is to send a detailed report when you
 encounter an issue. We always appreciate a well-written, thorough bug report,
 and will thank you for it!
 
933f207f
 Check that [our issue database](https://github.com/docker/docker/issues)
 doesn't already include that problem or suggestion before submitting an issue.
 If you find a match, add a quick "+1" or "I have this problem too." Doing this
 helps prioritize the most common problems and requests.
 
 When reporting issues, please include your host OS (Ubuntu 12.04, Fedora 19,
 etc). Please include:
d013b76e
 
 * The output of `uname -a`.
 * The output of `docker version`.
 * The output of `docker -D info`.
 
933f207f
 Please also include the steps required to reproduce the problem if possible and
 applicable. This information will help us review and fix your issue faster.
e4ae44b8
 
933f207f
 **Issue Report Template**:
6c11d077
 
 ```
 Description of problem:
 
 
 `docker version`:
 
 
 `docker info`:
 
 
 `uname -a`:
 
 
 Environment details (AWS, VirtualBox, physical, etc.):
 
 
 How reproducible:
 
 
 Steps to Reproduce:
 1.
 2.
 3.
 
 
 Actual Results:
 
 
 Expected Results:
 
 
 Additional info:
 
 
 
 ```
 
760736b3
 
933f207f
 ##Quick contribution tips and guidelines
 
 This section gives the experienced contributor some tips and guidelines.
 
 ###Pull requests are always welcome
 
 Not sure if that typo is worth a pull request? Found a bug and know how to fix
 it? Do it! We will appreciate it. Any significant improvement should be
 documented as [a GitHub issue](https://github.com/docker/docker/issues) before
 anybody starts working on it.
 
 We are always thrilled to receive pull requests. We do our best to process them
 quickly. If your pull request is not accepted on the first try,
 don't get discouraged! Our contributor's guide explains [the review process we
 use for simple changes](https://docs.docker.com/project/make-a-contribution/).
 
 ### Design and cleanup proposals
 
 You can propose new designs for existing Docker features. You can also design
 entirely new features. We really appreciate contributors who want to refactor or
 otherwise cleanup our project. For information on making these types of
 contributions, see [the advanced contribution
 section](https://docs.docker.com/project/advanced-contributing/) in the
 contributors guide.
 
 We try hard to keep Docker lean and focused. Docker can't do everything for
 everybody. This means that we might decide against incorporating a new feature.
 However, there might be a way to implement that feature *on top of* Docker.
 
 ### Talking to other Docker users and contributors
 
 <table class="tg">
   <col width="45%">
   <col width="65%">
   <tr>
     <td>Internet&nbsp;Relay&nbsp;Chat&nbsp;(IRC)</th>
     <td>
       <p>
         IRC a direct line to our most knowledgeable Docker users; we have
         both the  <code>#docker</code> and <code>#docker-dev</code> group on 
         <strong>irc.freenode.net</strong>.  
         IRC is a rich chat protocol but it can overwhelm new users. You can search
         <a href="https://botbot.me/freenode/docker/#" target="_blank">our chat archives</a>.
       </p>
       Read our <a href="https://docs.docker.com/project/get-help/#irc-quickstart" target="_blank">IRC quickstart guide</a> for an easy way to get started.
     </td>
   </tr>
   <tr>
     <td>Google Groups</td>
     <td>
       There are two groups.
       <a href="https://groups.google.com/forum/#!forum/docker-user" target="_blank">Docker-user</a>
       is for people using Docker containers. 
       The <a href="https://groups.google.com/forum/#!forum/docker-dev" target="_blank">docker-dev</a> 
       group is for contributors and other people contributing to the Docker 
       project.
     </td>
   </tr>
   <tr>
     <td>Twitter</td>
     <td>
       You can follow <a href="https://twitter.com/docker/" target="_blank">Docker's Twitter feed</a>
       to get updates on our products. You can also tweet us questions or just 
       share blogs or stories.
     </td>
   </tr>
   <tr>
     <td>Stack Overflow</td>
     <td>
       Stack Overflow has over 7000K Docker questions listed. We regularly 
       monitor <a href="http://stackoverflow.com/search?tab=newest&q=docker" target="_blank">Docker questions</a>
       and so do many other knowledgeable Docker users.
     </td>
   </tr>
 </table>
760736b3
 
 
 ### Conventions
 
d013b76e
 Fork the repository and make changes on your fork in a feature branch:
760736b3
 
933f207f
 - If it's a bug fix branch, name it XXXX-something where XXXX is the number of
 	the issue. 
 - If it's a feature branch, create an enhancement issue to announce
 	your intentions, and name it XXXX-something where XXXX is the number of the
 	issue.
 
 Submit unit tests for your changes. Go has a great test framework built in; use
 it! Take a look at existing tests for inspiration. [Run the full test
 suite](https://docs.docker.com/project/test-and-docs/) on your branch before
 submitting a pull request.
 
 Update the documentation when creating or modifying features. Test your
 documentation changes for clarity, concision, and correctness, as well as a
 clean documentation build. See our contributors guide for [our style
 guide](https://docs.docker.com/project/doc-style) and instructions on [building
1d9fb258
 the documentation](https://docs.docker.com/project/test-and-docs/#build-and-test-the-documentation).
760736b3
 
321d94b1
 Write clean code. Universally formatted code promotes ease of writing, reading,
147ad348
 and maintenance. Always run `gofmt -s -w file.go` on each changed file before
d013b76e
 committing your changes. Most editors have plug-ins that do this automatically.
760736b3
 
933f207f
 Pull request descriptions should be as clear as possible and include a reference
 to all the issues that they address.
321d94b1
 
933f207f
 Commit messages must start with a capitalized and short summary (max. 50 chars)
 written in the imperative, followed by an optional, more detailed explanatory
 text which is separated from the summary by an empty line.
5f00372a
 
321d94b1
 Code review comments may be added to your pull request. Discuss, then make the
933f207f
 suggested modifications and push additional commits to your feature branch. Post
 a comment after pushing. New commits show up in the pull request automatically,
 but the reviewers are notified only when you comment.
321d94b1
 
933f207f
 Pull requests must be cleanly rebased on top of master without multiple branches
4c282b97
 mixed into the PR.
 
 **Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
 feature branch to update your pull request rather than `merge master`.
 
933f207f
 Before you make a pull request, squash your commits into logical units of work
68a9cd63
 using `git rebase -i` and `git push -f`. A logical unit of work is a consistent
 set of patches that should be reviewed together: for example, upgrading the
 version of a vendored dependency and taking advantage of its now available new
 feature constitute two separate units of work. Implementing a new function and
 calling it in another file constitute a single logical unit of work. The very
 high majory of submissions should have a single commit, so if in doubt: squash
 down to one.
 
 After every commit, [make sure the test suite passes]
 ((https://docs.docker.com/project/test-and-docs/)). Include documentation
 changes in the same pull request so that a revert would remove all traces of
 the feature or fix.
321d94b1
 
933f207f
 Include an issue reference like `Closes #XXXX` or `Fixes #XXXX` in commits that
 close an issue. Including references automatically closes the issue on a merge.
321d94b1
 
933f207f
 Please do not add yourself to the `AUTHORS` file, as it is regenerated regularly
 from the Git history.
24ddfe3f
 
5051b861
 ### Merge approval
 
933f207f
 Docker maintainers use LGTM (Looks Good To Me) in comments on the code review to
 indicate acceptance.
5051b861
 
 A change requires LGTMs from an absolute majority of the maintainers of each
d013b76e
 component affected. For example, if a change affects `docs/` and `registry/`, it
 needs an absolute majority from the maintainers of `docs/` AND, separately, an
 absolute majority of the maintainers of `registry/`.
5051b861
 
933f207f
 For more details, see the [MAINTAINERS](MAINTAINERS) page.
5051b861
 
821a82ac
 ### Sign your work
310a1742
 
933f207f
 The sign-off is a simple line at the end of the explanation for the patch. Your
 signature certifies that you wrote the patch or otherwise have the right to pass
 it on as an open-source patch. The rules are pretty simple: if you can certify
 the below (from [developercertificate.org](http://developercertificate.org/)):
821a82ac
 
 ```
aceb10b1
 Developer Certificate of Origin
 Version 1.1
 
 Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
 660 York Street, Suite 102,
 San Francisco, CA 94110 USA
 
 Everyone is permitted to copy and distribute verbatim copies of this
 license document, but changing it is not allowed.
 
 Developer's Certificate of Origin 1.1
 
 By making a contribution to this project, I certify that:
 
 (a) The contribution was created in whole or in part by me and I
     have the right to submit it under the open source license
     indicated in the file; or
 
 (b) The contribution is based upon previous work that, to the best
     of my knowledge, is covered under an appropriate open source
     license and I have the right under that license to submit that
     work with modifications, whether created in whole or in part
     by me, under the same open source license (unless I am
     permitted to submit under a different license), as indicated
     in the file; or
 
 (c) The contribution was provided directly to me by some other
     person who certified (a), (b) or (c) and I have not modified
     it.
 
 (d) I understand and agree that this project and the contribution
     are public and that a record of the contribution (including all
     personal information I submit with it, including my sign-off) is
     maintained indefinitely and may be redistributed consistent with
     this project or the open source license(s) involved.
821a82ac
 ```
 
d013b76e
 Then you just add a line to every git commit message:
821a82ac
 
6b04d597
     Signed-off-by: Joe Smith <joe.smith@email.com>
821a82ac
 
933f207f
 Use your real name (sorry, no pseudonyms or anonymous contributions.)
821a82ac
 
6b04d597
 If you set your `user.name` and `user.email` git configs, you can sign your
 commit automatically with `git commit -s`.
0eb5f233
 
6b04d597
 Note that the old-style `Docker-DCO-1.1-Signed-off-by: ...` format is still
 accepted, so there is no need to update outstanding pull requests to the new
 format right away, but please do adjust your processes for future contributions.
0eb5f233
 
24ddfe3f
 ### How can I become a maintainer?
 
d013b76e
 * Step 1: Learn the component inside out
 * Step 2: Make yourself useful by contributing code, bug fixes, support etc.
 * Step 3: Volunteer on the IRC channel (#docker at Freenode)
 * Step 4: Propose yourself at a scheduled docker meeting in #docker-dev
24ddfe3f
 
d013b76e
 Don't forget: being a maintainer is a time investment. Make sure you
933f207f
 will have time to make yourself available. You don't have to be a
d013b76e
 maintainer to make a difference on the project!
24ddfe3f
 
933f207f
 ### IRC meetings
c58c70b8
 
933f207f
 There are two monthly meetings taking place on #docker-dev IRC to accomodate all
 timezones. Anybody can propose a topic for discussion prior to the meeting.
c58c70b8
 
 If you feel the conversation is going off-topic, feel free to point it out.
 
933f207f
 For the exact dates and times, have a look at [the irc-minutes
 repo](https://github.com/docker/irc-minutes). The minutes also contain all the
 notes from previous meetings.
c58c70b8
 
933f207f
 ## Docker community guidelines
73652259
 
933f207f
 We want to keep the Docker community awesome, growing and collaborative. We need
 your help to keep it that way. To help with this we've come up with some general
 guidelines for the community as a whole:
73652259
 
933f207f
 * Be nice: Be courteous, respectful and polite to fellow community members:
   no regional, racial, gender, or other abuse will be tolerated. We like
   nice people way better than mean ones!
73652259
 
933f207f
 * Encourage diversity and participation: Make everyone in our community feel
   welcome, regardless of their background and the extent of their
73652259
   contributions, and do everything possible to encourage participation in
   our community.
 
 * Keep it legal: Basically, don't get us in trouble. Share only content that
933f207f
   you own, do not share private or sensitive information, and don't break
   the law.
73652259
 
933f207f
 * Stay on topic: Make sure that you are posting to the correct channel and
   avoid off-topic discussions. Remember when you update an issue or respond
   to an email you are potentially sending to a large number of people. Please
   consider this before you update. Also remember that nobody likes spam.
73652259
 
933f207f
 ### Guideline violations — 3 strikes method
73652259
 
 The point of this section is not to find opportunities to punish people, but we
 do need a fair way to deal with people who are making our community suck.
 
 1. First occurrence: We'll give you a friendly, but public reminder that the
    behavior is inappropriate according to our guidelines.
 
 2. Second occurrence: We will send you a private message with a warning that
    any additional violations will result in removal from the community.
 
 3. Third occurrence: Depending on the violation, we may need to delete or ban
    your account.
 
 **Notes:**
 
 * Obvious spammers are banned on first occurrence. If we don't do this, we'll
   have spam all over the place.
 
933f207f
 * Violations are forgiven after 6 months of good behavior, and we won't hold a
   grudge.
73652259
 
933f207f
 * People who commit minor infractions will get some education, rather than
   hammering them in the 3 strikes process.
73652259
 
933f207f
 * The rules apply equally to everyone in the community, no matter how much
 	you've contributed.
73652259
 
 * Extreme violations of a threatening, abusive, destructive or illegal nature
933f207f
 	will be addressed immediately and are not subject to 3 strikes or forgiveness.
73652259
 
8b40d385
 * Contact abuse@docker.com to report abuse or appeal violations. In the case of
933f207f
 	appeals, we know that mistakes happen, and we'll work with you to come up with a
 	fair solution if there has been a misunderstanding.
73652259