2017-10-11 10:06:02 -04:00
|
|
|
# Contribute to the Moby Project
|
2013-03-28 20:04:21 -04:00
|
|
|
|
2017-10-11 10:06:02 -04:00
|
|
|
Want to hack on the Moby Project? Awesome! We have a contributor's guide that explains
|
|
|
|
[setting up a development environment and the contribution
|
|
|
|
process](docs/contributing/).
|
2015-03-09 14:31:32 -04:00
|
|
|
|
2016-05-01 14:03:22 -04:00
|
|
|
[![Contributors guide](docs/static_files/contributors.png)](https://docs.docker.com/opensource/project/who-written-for/)
|
2015-03-09 14:31:32 -04:00
|
|
|
|
|
|
|
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.
|
2013-03-28 20:04:21 -04:00
|
|
|
|
2014-07-17 15:01:46 -04:00
|
|
|
## Topics
|
|
|
|
|
2014-11-09 10:16:19 -05:00
|
|
|
* [Reporting Security Issues](#reporting-security-issues)
|
2014-07-17 15:01:46 -04:00
|
|
|
* [Design and Cleanup Proposals](#design-and-cleanup-proposals)
|
2015-03-09 14:31:32 -04:00
|
|
|
* [Reporting Issues](#reporting-other-issues)
|
|
|
|
* [Quick Contribution Tips and Guidelines](#quick-contribution-tips-and-guidelines)
|
2014-08-07 02:23:00 -04:00
|
|
|
* [Community Guidelines](#docker-community-guidelines)
|
2014-07-17 15:01:46 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
## Reporting security issues
|
2014-07-17 15:01:46 -04:00
|
|
|
|
2017-10-11 10:06:02 -04:00
|
|
|
The Moby maintainers take security seriously. If you discover a security
|
2015-03-09 14:31:32 -04:00
|
|
|
issue, please bring it to their attention right away!
|
2014-07-17 15:01:46 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
Please **DO NOT** file a public issue, instead send your report privately to
|
2015-09-07 13:54:22 -04:00
|
|
|
[security@docker.com](mailto:security@docker.com).
|
2014-07-17 15:01:46 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
Security reports are greatly appreciated and we will publicly thank you for it.
|
2017-10-11 10:06:02 -04:00
|
|
|
We also like to send gifts—if you're into schwag, make sure to let
|
2015-06-25 08:45:24 -04:00
|
|
|
us know. We currently do not offer a paid security bounty program, but are not
|
2015-03-09 14:31:32 -04:00
|
|
|
ruling it out in the future.
|
2014-07-17 15:01:46 -04:00
|
|
|
|
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
## Reporting other issues
|
2013-11-27 13:41:20 -05:00
|
|
|
|
2014-11-09 10:17:23 -05:00
|
|
|
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!
|
|
|
|
|
2017-06-29 05:10:02 -04:00
|
|
|
Check that [our issue database](https://github.com/moby/moby/issues)
|
2015-03-09 14:31:32 -04:00
|
|
|
doesn't already include that problem or suggestion before submitting an issue.
|
2015-12-27 18:26:05 -05:00
|
|
|
If you find a match, you can use the "subscribe" button to get notified on
|
|
|
|
updates. Do *not* leave random "+1" or "I have this too" comments, as they
|
|
|
|
only clutter the discussion, and don't help resolving it. However, if you
|
|
|
|
have ways to reproduce the issue or have additional information that may help
|
|
|
|
resolving the issue, please leave a comment.
|
2015-03-09 14:31:32 -04:00
|
|
|
|
2015-12-27 18:26:05 -05:00
|
|
|
When reporting issues, always include:
|
2014-06-29 18:01:11 -04:00
|
|
|
|
|
|
|
* The output of `docker version`.
|
2015-09-17 21:58:34 -04:00
|
|
|
* The output of `docker info`.
|
2014-06-29 18:01:11 -04:00
|
|
|
|
2015-12-27 18:26:05 -05:00
|
|
|
Also include the steps required to reproduce the problem if possible and
|
2015-03-09 14:31:32 -04:00
|
|
|
applicable. This information will help us review and fix your issue faster.
|
2015-12-27 18:26:05 -05:00
|
|
|
When sending lengthy log-files, consider posting them as a gist (https://gist.github.com).
|
|
|
|
Don't forget to remove sensitive data from your logfiles before posting (you can
|
|
|
|
replace those parts with "REDACTED").
|
2013-11-27 13:41:20 -05:00
|
|
|
|
2016-05-01 14:03:22 -04:00
|
|
|
## Quick contribution tips and guidelines
|
2015-03-09 14:31:32 -04:00
|
|
|
|
|
|
|
This section gives the experienced contributor some tips and guidelines.
|
|
|
|
|
2016-05-01 14:03:22 -04:00
|
|
|
### Pull requests are always welcome
|
2015-03-09 14:31:32 -04:00
|
|
|
|
|
|
|
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
|
2017-06-29 05:10:02 -04:00
|
|
|
documented as [a GitHub issue](https://github.com/moby/moby/issues) before
|
2015-03-09 14:31:32 -04:00
|
|
|
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
|
2015-11-10 10:49:07 -05:00
|
|
|
use for simple changes](https://docs.docker.com/opensource/workflow/make-a-contribution/).
|
2015-03-09 14:31:32 -04:00
|
|
|
|
|
|
|
### 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
|
2015-11-10 10:49:07 -05:00
|
|
|
section](https://docs.docker.com/opensource/workflow/advanced-contributing/) in
|
|
|
|
the contributors guide.
|
2015-03-09 14:31:32 -04:00
|
|
|
|
2017-10-11 10:06:02 -04:00
|
|
|
### Connect with other Moby Project contributors
|
2015-03-09 14:31:32 -04:00
|
|
|
|
|
|
|
<table class="tg">
|
|
|
|
<col width="45%">
|
|
|
|
<col width="65%">
|
2016-05-01 14:03:22 -04:00
|
|
|
<tr>
|
|
|
|
<td>Forums</td>
|
|
|
|
<td>
|
|
|
|
A public forum for users to discuss questions and explore current design patterns and
|
2017-10-11 10:06:02 -04:00
|
|
|
best practices about all the Moby projects. To participate, log in with your Github
|
|
|
|
account or create an account at <a href="https://forums.mobyproject.org" target="_blank">https://forums.mobyproject.org</a>.
|
2016-05-01 14:03:22 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
2015-03-09 14:31:32 -04:00
|
|
|
<tr>
|
2017-10-11 10:06:02 -04:00
|
|
|
<td>Slack</td>
|
2015-03-09 14:31:32 -04:00
|
|
|
<td>
|
|
|
|
<p>
|
2017-10-11 10:06:02 -04:00
|
|
|
Register for the Docker Community Slack at
|
|
|
|
<a href="https://community.docker.com/registrations/groups/4316" target="_blank">https://community.docker.com/registrations/groups/4316</a>.
|
|
|
|
We use the #moby-project channel for general discussion, and there are seperate channels for other Moby projects such as #containerd.
|
|
|
|
Archives are available at <a href="https://dockercommunity.slackarchive.io/" target="_blank">https://dockercommunity.slackarchive.io/</a>.
|
2016-05-01 14:03:22 -04:00
|
|
|
</p>
|
2015-03-09 14:31:32 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Twitter</td>
|
|
|
|
<td>
|
2017-10-11 10:06:02 -04:00
|
|
|
You can follow <a href="https://twitter.com/moby/" target="_blank">Moby Project Twitter feed</a>
|
2015-05-13 23:45:33 -04:00
|
|
|
to get updates on our products. You can also tweet us questions or just
|
2015-03-09 14:31:32 -04:00
|
|
|
share blogs or stories.
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2013-03-28 20:04:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
### Conventions
|
|
|
|
|
2014-06-29 18:01:11 -04:00
|
|
|
Fork the repository and make changes on your fork in a feature branch:
|
2013-03-28 20:04:21 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
- 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.
|
|
|
|
|
2017-08-04 17:25:51 -04:00
|
|
|
Submit tests for your changes. See [TESTING.md](./TESTING.md) for details.
|
2015-03-09 14:31:32 -04:00
|
|
|
|
2017-05-23 16:32:34 -04:00
|
|
|
If your changes need integration tests, write them against the API. The `cli`
|
|
|
|
integration tests are slowly either migrated to API tests or moved away as unit
|
2017-10-11 10:06:02 -04:00
|
|
|
tests in `docker/cli` and end-to-end tests for Docker.
|
2017-05-23 16:32:34 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
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
|
2015-11-10 10:49:07 -05:00
|
|
|
guide](https://docs.docker.com/opensource/doc-style) and instructions on [building
|
|
|
|
the documentation](https://docs.docker.com/opensource/project/test-and-docs/#build-and-test-the-documentation).
|
2013-03-28 20:04:21 -04:00
|
|
|
|
2013-04-01 12:28:54 -04:00
|
|
|
Write clean code. Universally formatted code promotes ease of writing, reading,
|
2014-05-27 20:56:37 -04:00
|
|
|
and maintenance. Always run `gofmt -s -w file.go` on each changed file before
|
2014-06-29 18:01:11 -04:00
|
|
|
committing your changes. Most editors have plug-ins that do this automatically.
|
2013-03-28 20:04:21 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
Pull request descriptions should be as clear as possible and include a reference
|
|
|
|
to all the issues that they address.
|
2013-04-01 12:28:54 -04:00
|
|
|
|
2017-01-10 18:59:09 -05:00
|
|
|
### Successful Changes
|
|
|
|
|
|
|
|
Before contributing large or high impact changes, make the effort to coordinate
|
|
|
|
with the maintainers of the project before submitting a pull request. This
|
|
|
|
prevents you from doing extra work that may or may not be merged.
|
|
|
|
|
|
|
|
Large PRs that are just submitted without any prior communication are unlikely
|
|
|
|
to be successful.
|
|
|
|
|
|
|
|
While pull requests are the methodology for submitting changes to code, changes
|
|
|
|
are much more likely to be accepted if they are accompanied by additional
|
|
|
|
engineering work. While we don't define this explicitly, most of these goals
|
|
|
|
are accomplished through communication of the design goals and subsequent
|
|
|
|
solutions. Often times, it helps to first state the problem before presenting
|
|
|
|
solutions.
|
|
|
|
|
|
|
|
Typically, the best methods of accomplishing this are to submit an issue,
|
|
|
|
stating the problem. This issue can include a problem statement and a
|
|
|
|
checklist with requirements. If solutions are proposed, alternatives should be
|
|
|
|
listed and eliminated. Even if the criteria for elimination of a solution is
|
|
|
|
frivolous, say so.
|
|
|
|
|
|
|
|
Larger changes typically work best with design documents. These are focused on
|
|
|
|
providing context to the design at the time the feature was conceived and can
|
|
|
|
inform future documentation contributions.
|
|
|
|
|
|
|
|
### Commit Messages
|
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
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.
|
2014-04-30 13:23:51 -04:00
|
|
|
|
2017-01-10 18:59:09 -05:00
|
|
|
Commit messages should follow best practices, including explaining the context
|
|
|
|
of the problem and how it was solved, including in caveats or follow up changes
|
|
|
|
required. They should tell the story of the change and provide readers
|
|
|
|
understanding of what led to it.
|
|
|
|
|
|
|
|
If you're lost about what this even means, please see [How to Write a Git
|
|
|
|
Commit Message](http://chris.beams.io/posts/git-commit/) for a start.
|
|
|
|
|
|
|
|
In practice, the best approach to maintaining a nice commit message is to
|
|
|
|
leverage a `git add -p` and `git commit --amend` to formulate a solid
|
|
|
|
changeset. This allows one to piece together a change, as information becomes
|
|
|
|
available.
|
|
|
|
|
|
|
|
If you squash a series of commits, don't just submit that. Re-write the commit
|
|
|
|
message, as if the series of commits was a single stroke of brilliance.
|
|
|
|
|
|
|
|
That said, there is no requirement to have a single commit for a PR, as long as
|
|
|
|
each commit tells the story. For example, if there is a feature that requires a
|
|
|
|
package, it might make sense to have the package in a separate commit then have
|
|
|
|
a subsequent commit that uses it.
|
|
|
|
|
|
|
|
Remember, you're telling part of the story with the commit message. Don't make
|
|
|
|
your chapter weird.
|
|
|
|
|
|
|
|
### Review
|
|
|
|
|
2013-04-01 12:28:54 -04:00
|
|
|
Code review comments may be added to your pull request. Discuss, then make the
|
2015-03-09 14:31:32 -04:00
|
|
|
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.
|
2013-04-01 12:28:54 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
Pull requests must be cleanly rebased on top of master without multiple branches
|
2014-07-31 15:48:39 -04:00
|
|
|
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`.
|
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
Before you make a pull request, squash your commits into logical units of work
|
2015-03-16 12:30:32 -04:00
|
|
|
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
|
2015-06-13 12:21:50 -04:00
|
|
|
high majority of submissions should have a single commit, so if in doubt: squash
|
2015-03-16 12:30:32 -04:00
|
|
|
down to one.
|
|
|
|
|
2017-08-04 17:25:51 -04:00
|
|
|
After every commit, [make sure the test suite passes](./TESTING.md). Include
|
|
|
|
documentation changes in the same pull request so that a revert would remove
|
|
|
|
all traces of the feature or fix.
|
2013-04-01 12:28:54 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
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.
|
2013-04-01 12:28:54 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
Please do not add yourself to the `AUTHORS` file, as it is regenerated regularly
|
|
|
|
from the Git history.
|
2013-05-28 22:39:09 -04:00
|
|
|
|
2015-07-21 14:53:36 -04:00
|
|
|
Please see the [Coding Style](#coding-style) for further guidelines.
|
|
|
|
|
2014-02-10 19:10:50 -05:00
|
|
|
### Merge approval
|
|
|
|
|
2017-10-11 10:06:02 -04:00
|
|
|
Moby maintainers use LGTM (Looks Good To Me) in comments on the code review to
|
|
|
|
indicate acceptance, or use the Github review approval feature.
|
2014-02-10 19:10:50 -05:00
|
|
|
|
2017-10-11 10:06:02 -04:00
|
|
|
For an explanation of the review and approval process see the
|
|
|
|
[REVIEWING](project/REVIEWING.md) page.
|
2014-02-10 19:10:50 -05:00
|
|
|
|
Add Developer Certificate of Origin Text
We purposely chose to license Docker under the Apache 2.0 license. This is a well-known
license, which is popular for its permissive and flexible properties, while still
encouraging a collaborative community. It also makes certain representations with regard
to contributions, and the rights given to contributors, the project, people who use Docker,
people who modify Docker, etc.
This approach to contributions is inspired by the popular Linux Developer
"Certificate of Origin". This approach makes it simple for new contributors to get started,
and avoids bureaucracy in tracking contributions and contributors.
To indicate accordance, each individual contribution to the Project is signed off by the
developer, using his or her real name, email address, and github handle in the format below:
Docker-DCO-1.0-Signed-off-by: Joe Smith <joe.smith@email.com>
2013-10-04 17:17:59 -04:00
|
|
|
### Sign your work
|
2013-10-10 16:25:59 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
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/)):
|
Add Developer Certificate of Origin Text
We purposely chose to license Docker under the Apache 2.0 license. This is a well-known
license, which is popular for its permissive and flexible properties, while still
encouraging a collaborative community. It also makes certain representations with regard
to contributions, and the rights given to contributors, the project, people who use Docker,
people who modify Docker, etc.
This approach to contributions is inspired by the popular Linux Developer
"Certificate of Origin". This approach makes it simple for new contributors to get started,
and avoids bureaucracy in tracking contributions and contributors.
To indicate accordance, each individual contribution to the Project is signed off by the
developer, using his or her real name, email address, and github handle in the format below:
Docker-DCO-1.0-Signed-off-by: Joe Smith <joe.smith@email.com>
2013-10-04 17:17:59 -04:00
|
|
|
|
|
|
|
```
|
2014-03-07 00:26:47 -05:00
|
|
|
Developer Certificate of Origin
|
|
|
|
Version 1.1
|
|
|
|
|
|
|
|
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
2016-09-22 10:34:32 -04:00
|
|
|
1 Letterman Drive
|
|
|
|
Suite D4700
|
|
|
|
San Francisco, CA, 94129
|
2014-03-07 00:26:47 -05:00
|
|
|
|
|
|
|
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.
|
Add Developer Certificate of Origin Text
We purposely chose to license Docker under the Apache 2.0 license. This is a well-known
license, which is popular for its permissive and flexible properties, while still
encouraging a collaborative community. It also makes certain representations with regard
to contributions, and the rights given to contributors, the project, people who use Docker,
people who modify Docker, etc.
This approach to contributions is inspired by the popular Linux Developer
"Certificate of Origin". This approach makes it simple for new contributors to get started,
and avoids bureaucracy in tracking contributions and contributors.
To indicate accordance, each individual contribution to the Project is signed off by the
developer, using his or her real name, email address, and github handle in the format below:
Docker-DCO-1.0-Signed-off-by: Joe Smith <joe.smith@email.com>
2013-10-04 17:17:59 -04:00
|
|
|
```
|
|
|
|
|
2014-06-29 18:01:11 -04:00
|
|
|
Then you just add a line to every git commit message:
|
Add Developer Certificate of Origin Text
We purposely chose to license Docker under the Apache 2.0 license. This is a well-known
license, which is popular for its permissive and flexible properties, while still
encouraging a collaborative community. It also makes certain representations with regard
to contributions, and the rights given to contributors, the project, people who use Docker,
people who modify Docker, etc.
This approach to contributions is inspired by the popular Linux Developer
"Certificate of Origin". This approach makes it simple for new contributors to get started,
and avoids bureaucracy in tracking contributions and contributors.
To indicate accordance, each individual contribution to the Project is signed off by the
developer, using his or her real name, email address, and github handle in the format below:
Docker-DCO-1.0-Signed-off-by: Joe Smith <joe.smith@email.com>
2013-10-04 17:17:59 -04:00
|
|
|
|
2014-08-01 15:23:09 -04:00
|
|
|
Signed-off-by: Joe Smith <joe.smith@email.com>
|
Add Developer Certificate of Origin Text
We purposely chose to license Docker under the Apache 2.0 license. This is a well-known
license, which is popular for its permissive and flexible properties, while still
encouraging a collaborative community. It also makes certain representations with regard
to contributions, and the rights given to contributors, the project, people who use Docker,
people who modify Docker, etc.
This approach to contributions is inspired by the popular Linux Developer
"Certificate of Origin". This approach makes it simple for new contributors to get started,
and avoids bureaucracy in tracking contributions and contributors.
To indicate accordance, each individual contribution to the Project is signed off by the
developer, using his or her real name, email address, and github handle in the format below:
Docker-DCO-1.0-Signed-off-by: Joe Smith <joe.smith@email.com>
2013-10-04 17:17:59 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
Use your real name (sorry, no pseudonyms or anonymous contributions.)
|
Add Developer Certificate of Origin Text
We purposely chose to license Docker under the Apache 2.0 license. This is a well-known
license, which is popular for its permissive and flexible properties, while still
encouraging a collaborative community. It also makes certain representations with regard
to contributions, and the rights given to contributors, the project, people who use Docker,
people who modify Docker, etc.
This approach to contributions is inspired by the popular Linux Developer
"Certificate of Origin". This approach makes it simple for new contributors to get started,
and avoids bureaucracy in tracking contributions and contributors.
To indicate accordance, each individual contribution to the Project is signed off by the
developer, using his or her real name, email address, and github handle in the format below:
Docker-DCO-1.0-Signed-off-by: Joe Smith <joe.smith@email.com>
2013-10-04 17:17:59 -04:00
|
|
|
|
2014-08-01 15:23:09 -04:00
|
|
|
If you set your `user.name` and `user.email` git configs, you can sign your
|
|
|
|
commit automatically with `git commit -s`.
|
2014-01-07 19:17:15 -05:00
|
|
|
|
2013-05-28 22:39:09 -04:00
|
|
|
### How can I become a maintainer?
|
|
|
|
|
2015-12-22 09:42:36 -05:00
|
|
|
The procedures for adding new maintainers are explained in the
|
|
|
|
global [MAINTAINERS](https://github.com/docker/opensource/blob/master/MAINTAINERS)
|
|
|
|
file in the [https://github.com/docker/opensource/](https://github.com/docker/opensource/)
|
|
|
|
repository.
|
2013-05-28 22:39:09 -04:00
|
|
|
|
2014-06-29 18:01:11 -04:00
|
|
|
Don't forget: being a maintainer is a time investment. Make sure you
|
2015-03-09 14:31:32 -04:00
|
|
|
will have time to make yourself available. You don't have to be a
|
2014-06-29 18:01:11 -04:00
|
|
|
maintainer to make a difference on the project!
|
2013-05-28 22:39:09 -04:00
|
|
|
|
2017-12-04 07:25:23 -05:00
|
|
|
### Manage issues and pull requests using the Derek bot
|
|
|
|
|
|
|
|
If you want to help label, assign, close or reopen issues or pull requests
|
|
|
|
without commit rights, ask a maintainer to add your Github handle to the
|
|
|
|
`.DEREK.yml` file. [Derek](https://github.com/alexellis/derek) is a bot that extends
|
|
|
|
Github's user permissions to help non-committers to manage issues and pull requests simply by commenting.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
* Labels
|
|
|
|
|
|
|
|
```
|
|
|
|
Derek add label: kind/question
|
|
|
|
Derek remove label: status/claimed
|
|
|
|
```
|
|
|
|
|
|
|
|
* Assign work
|
|
|
|
|
|
|
|
```
|
|
|
|
Derek assign: username
|
|
|
|
Derek unassign: me
|
|
|
|
```
|
|
|
|
|
|
|
|
* Manage issues and PRs
|
|
|
|
|
|
|
|
```
|
|
|
|
Derek close
|
|
|
|
Derek reopen
|
|
|
|
```
|
|
|
|
|
2017-10-11 10:06:02 -04:00
|
|
|
## Moby community guidelines
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2017-10-11 10:06:02 -04:00
|
|
|
We want to keep the Moby community awesome, growing and collaborative. We need
|
2015-03-09 14:31:32 -04:00
|
|
|
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:
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
* 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!
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
* Encourage diversity and participation: Make everyone in our community feel
|
|
|
|
welcome, regardless of their background and the extent of their
|
2014-07-22 23:44:35 -04:00
|
|
|
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
|
2015-03-09 14:31:32 -04:00
|
|
|
you own, do not share private or sensitive information, and don't break
|
|
|
|
the law.
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
* 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.
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2016-01-08 09:49:17 -05:00
|
|
|
* Don't send email to the maintainers: There's no need to send email to the
|
|
|
|
maintainers to ask them to investigate an issue or to take a look at a
|
|
|
|
pull request. Instead of sending an email, GitHub mentions should be
|
|
|
|
used to ping maintainers to review a pull request, a proposal or an
|
|
|
|
issue.
|
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
### Guideline violations — 3 strikes method
|
2014-07-22 23:44:35 -04:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
* Violations are forgiven after 6 months of good behavior, and we won't hold a
|
|
|
|
grudge.
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
* People who commit minor infractions will get some education, rather than
|
|
|
|
hammering them in the 3 strikes process.
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2015-03-09 14:31:32 -04:00
|
|
|
* The rules apply equally to everyone in the community, no matter how much
|
|
|
|
you've contributed.
|
2014-07-22 23:44:35 -04:00
|
|
|
|
|
|
|
* Extreme violations of a threatening, abusive, destructive or illegal nature
|
2015-03-09 14:31:32 -04:00
|
|
|
will be addressed immediately and are not subject to 3 strikes or forgiveness.
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2014-10-23 13:54:40 -04:00
|
|
|
* Contact abuse@docker.com to report abuse or appeal violations. In the case of
|
2015-03-09 14:31:32 -04:00
|
|
|
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.
|
2014-07-22 23:44:35 -04:00
|
|
|
|
2015-07-21 14:53:36 -04:00
|
|
|
## Coding Style
|
|
|
|
|
|
|
|
Unless explicitly stated, we follow all coding guidelines from the Go
|
|
|
|
community. While some of these standards may seem arbitrary, they somehow seem
|
|
|
|
to result in a solid, consistent codebase.
|
|
|
|
|
|
|
|
It is possible that the code base does not currently comply with these
|
|
|
|
guidelines. We are not looking for a massive PR that fixes this, since that
|
|
|
|
goes against the spirit of the guidelines. All new contributions should make a
|
|
|
|
best effort to clean up and make the code base better than they left it.
|
|
|
|
Obviously, apply your best judgement. Remember, the goal here is to make the
|
|
|
|
code base easier for humans to navigate and understand. Always keep that in
|
|
|
|
mind when nudging others to comply.
|
|
|
|
|
|
|
|
The rules:
|
|
|
|
|
|
|
|
1. All code should be formatted with `gofmt -s`.
|
|
|
|
2. All code should pass the default levels of
|
|
|
|
[`golint`](https://github.com/golang/lint).
|
|
|
|
3. All code should follow the guidelines covered in [Effective
|
|
|
|
Go](http://golang.org/doc/effective_go.html) and [Go Code Review
|
|
|
|
Comments](https://github.com/golang/go/wiki/CodeReviewComments).
|
|
|
|
4. Comment the code. Tell us the why, the history and the context.
|
|
|
|
5. Document _all_ declarations and methods, even private ones. Declare
|
|
|
|
expectations, caveats and anything else that may be important. If a type
|
|
|
|
gets exported, having the comments already there will ensure it's ready.
|
2016-07-21 06:03:37 -04:00
|
|
|
6. Variable name length should be proportional to its context and no longer.
|
2015-07-21 14:53:36 -04:00
|
|
|
`noCommaALongVariableNameLikeThisIsNotMoreClearWhenASimpleCommentWouldDo`.
|
|
|
|
In practice, short methods will have short variable names and globals will
|
|
|
|
have longer names.
|
|
|
|
7. No underscores in package names. If you need a compound name, step back,
|
|
|
|
and re-examine why you need a compound name. If you still think you need a
|
|
|
|
compound name, lose the underscore.
|
|
|
|
8. No utils or helpers packages. If a function is not general enough to
|
2016-07-21 06:03:37 -04:00
|
|
|
warrant its own package, it has not been written generally enough to be a
|
2015-07-21 14:53:36 -04:00
|
|
|
part of a util package. Just leave it unexported and well-documented.
|
|
|
|
9. All tests should run with `go test` and outside tooling should not be
|
|
|
|
required. No, we don't need another unit testing framework. Assertion
|
|
|
|
packages are acceptable if they provide _real_ incremental value.
|
|
|
|
10. Even though we call these "rules" above, they are actually just
|
|
|
|
guidelines. Since you've read all the rules, you now know that.
|
|
|
|
|
|
|
|
If you are having trouble getting into the mood of idiomatic Go, we recommend
|
2016-05-01 14:03:22 -04:00
|
|
|
reading through [Effective Go](https://golang.org/doc/effective_go.html). The
|
|
|
|
[Go Blog](https://blog.golang.org) is also a great resource. Drinking the
|
2015-07-21 14:53:36 -04:00
|
|
|
kool-aid is a lot easier than going thirsty.
|