summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorHervé Beraud <hberaud@redhat.com>2019-02-07 16:19:30 +0100
committerHervé Beraud <hberaud@redhat.com>2019-02-22 17:12:18 +0100
commit0463334579fd5dd7891af3131a489dfd70beb2cf (patch)
tree7daa6e28bdc02f5b22b152dca98c7a9868cc866b /CONTRIBUTING.md
parent01f436ca4707569e9f8c3d08fb0a057aa62ea059 (diff)
downloadpodman-0463334579fd5dd7891af3131a489dfd70beb2cf.tar.gz
podman-0463334579fd5dd7891af3131a489dfd70beb2cf.tar.bz2
podman-0463334579fd5dd7891af3131a489dfd70beb2cf.zip
Introduce how to start to hack on libpod.
Introduce a new part inside the contribution guide who explain how to start to hack on libpod: - setup environment - install tools - using make - building podman - test your changes locally Signed-off-by: Hervé Beraud <hberaud@redhat.com>
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md84
1 files changed, 83 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 26e5473b2..b1b166fef 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,5 +1,5 @@
![PODMAN logo](logo/podman-logo-source.svg)
-# Contributing to Libpod
+# Contributing to libpod
We'd love to have you join the community! Below summarizes the processes
that we follow.
@@ -7,6 +7,7 @@ that we follow.
## Topics
* [Reporting Issues](#reporting-issues)
+* [Contributing to libpod](#contributing-to-libpod)
* [Submitting Pull Requests](#submitting-pull-requests)
* [Communications](#communications)
@@ -26,6 +27,87 @@ The easier it is for us to reproduce it, the faster it'll be fixed!
Please don't include any private/sensitive information in your issue!
+## Contributing to libpod
+
+This section describes how to start a contribution to libpod.
+
+### Prepare your environment
+
+Read the [install documentation to see how to install dependencies](install.md) .
+
+The install documentation will illustrate the following steps:
+- install libs and tools
+- check installed versions
+- configure network
+- how to install libpod from sources
+
+### Fork and clone libpod
+
+First you need to fork this project on GitHub.
+
+Be sure to have [defined your `$GOPATH` environment variable](https://github.com/golang/go/wiki/GOPATH).
+
+Create a path that correspond to your clone `mkdir -p $GOPATH/github.com/<you>`.
+
+Clone your fork locally:
+```shell
+$ git clone git@github.com:<you>/libpod github.com/<you> $GOPATH/github.com/<you>/libpod
+$ cd $GOPATH/github.com/<you>/libpod
+```
+
+You can also use `go get` to clone your fork:
+```shell
+$ go get github.com:<you>/libpod
+$ cd $GOPATH/github.com/<you>/libpod
+```
+
+### Deal with make
+
+Libpod use a Makefile to realize common action like building etc...
+
+You can list available actions by using:
+```shell
+$ make help
+Usage: make <target>
+...output...
+```
+
+### Install tools
+
+Makefile allow you to install needed tools:
+```shell
+$ make install.tools
+```
+
+### Building binaries and test your changes
+
+To test your changes do `make binaries` to generate your binaries.
+
+Your binaries are created inside the `bin/` directory and you can test your changes:
+```shell
+$ bin/podman -h
+bin/podman -h
+NAME:
+ podman - manage pods and images
+
+USAGE:
+ podman [global options] command [command options] [arguments...]
+
+VERSION:
+ 1.0.1-dev
+
+COMMANDS:
+ attach Attach to a running container
+ build Build an image using instructions from Dockerfiles
+ commit Create new image based on the changed container
+ container Manage Containers
+ cp Copy files/folders between a container and the local filesystem
+```
+
+Well, you can now create your own branch, apply changes on it, and then submitting your pull request.
+
+For further reading about branching [you can read this document](https://herve.beraud.io/containers/linux/podman/isolate/environment/2019/02/06/how-to-hack-on-podman.html).
+
## Submitting Pull Requests
No Pull Request (PR) is too small! Typos, additional comments in the code,