From c0fb127e93a2e214d26d94dd693725f65aef8b90 Mon Sep 17 00:00:00 2001 From: Karen Miller Date: Tue, 22 Jun 2021 11:08:32 -0700 Subject: [PATCH] Docs: improve section on building from source --- .../installation/install-from-source.md | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/sources/installation/install-from-source.md b/docs/sources/installation/install-from-source.md index 90a2c329b67a..4772db6765f0 100644 --- a/docs/sources/installation/install-from-source.md +++ b/docs/sources/installation/install-from-source.md @@ -3,27 +3,28 @@ title: Build from source --- # Build from source -In order to build Loki manually, you need to clone the GitHub repo and then `make Loki`. +Clone the Loki repository and use the provided `Makefile` +to build Loki from source. ## Prerequisites -- Go 1.14 or later -- Make -- Docker (for updating protobuf files and yacc files) +- [Go](https://golang.org/), version 1.14 or later; +set your `$GOPATH` environment variable +- `make` +- Docker (for updating protobuf and yacc files) -## Build manually on your local system +## Build locally -Clone Loki to `$GOPATH/src/github.com/grafana/loki`: +1. Clone Loki to `$GOPATH/src/github.com/grafana/loki`: -```bash -git clone https://github.com/grafana/loki $GOPATH/src/github.com/grafana/loki -``` + ```bash + git clone https://github.com/grafana/loki $GOPATH/src/github.com/grafana/loki + ``` -Then change into that directory and run `make loki`: +2. With a current working directory of `$GOPATH/src/github.com/grafana/loki`: -```bash -cd $GOPATH/src/github.com/grafana/loki -make loki -``` + ```bash + make loki + ``` -A file at ./cmd/loki/loki will be created and is the final built binary. +The built executable will be in `$GOPATH/src/github.com/grafana/loki/cmd/loki/loki`.