github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/docs/sources/community/contributing.md (about)

     1  ---
     2  title: Contributing to Loki
     3  ---
     4  # Contributing to Loki
     5  
     6  Loki uses [GitHub](https://github.com/grafana/loki) to manage reviews of pull requests:
     7  
     8  - If you have a trivial fix or improvement, go ahead and create a pull request.
     9  - If you plan to do something more involved, discuss your ideas on the relevant GitHub issue (creating one if it doesn't exist).
    10  
    11  ## Steps to contribute
    12  
    13  To contribute to Loki, you must clone it into your `$GOPATH` and add your fork
    14  as a remote.
    15  
    16  ```bash
    17  $ git clone https://github.com/grafana/loki.git $GOPATH/src/github.com/grafana/loki
    18  $ cd $GOPATH/src/github.com/grafana/loki
    19  $ git remote add fork <FORK_URL>
    20  
    21  # Make some changes!
    22  
    23  $ git add .
    24  $ git commit -m "docs: fix spelling error"
    25  $ git push -u fork HEAD
    26  
    27  # Open a PR!
    28  ```
    29  
    30  Note that if you downloaded Loki using `go get`, the message `package github.com/grafana/loki: no Go files in /go/src/github.com/grafana/loki`
    31  is normal and requires no actions to resolve.
    32  
    33  ### Building
    34  
    35  While `go install ./cmd/loki` works, the preferred way to build is by using
    36  `make`:
    37  
    38  - `make loki`: builds Loki and outputs the binary to `./cmd/loki/loki`
    39  
    40  - `make promtail`: builds Promtail and outputs the binary to
    41    `./cmd/promtail/promtail`
    42  
    43  - `make logcli`: builds LogCLI and outputs the binary to `./cmd/logcli/logcli`
    44  
    45  - `make loki-canary`: builds Loki Canary and outputs the binary to
    46    `./cmd/loki-canary/loki-canary`
    47  
    48  - `make docker-driver`: builds the Loki Docker Driver and installs it into
    49    Docker.
    50  
    51  - `make images`: builds all Docker images (optionally suffix the previous binary
    52      commands with `-image`, e.g., `make loki-image`).
    53  
    54  These commands can be chained together to build multiple binaries in one go:
    55  
    56  ```bash
    57  # Builds binaries for Loki, Promtail, and LogCLI.
    58  $ make loki promtail logcli
    59  ```
    60  
    61  ## Contribute to the Helm Chart
    62  
    63  The official Loki helm charts can be found in the [Grafana Helm Charts Repo](https://github.com/grafana/helm-charts).