mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 00:04:15 -04:00
Update README.md on compiling from GitHub (#2543)
This commit is contained in:
24
README.md
24
README.md
@@ -44,24 +44,24 @@ out-of-tree plugins.
|
||||
|
||||
## Compilation from Source
|
||||
|
||||
Check out the project:
|
||||
To compile CoreDNS, we assume you have a working Go setup. See various tutorials if you don’t have that already configured.
|
||||
|
||||
First, make sure your `$GOPATH` is correctly set. See [here](https://github.com/golang/go/wiki/SettingGOPATH) for details. Then, check out the project under your `$GOPATH` and run `make` to compile the binary:
|
||||
|
||||
~~~
|
||||
% git clone https://github.com/coredns/coredns
|
||||
~~~
|
||||
|
||||
We vendor most (not all!) packages. This is mostly because vendoring isn't a perfect solution (in
|
||||
Go). We don't vendor `mholt/caddy` and `miekg/dns` for instance. Using `make` will pull down these
|
||||
dependencies and checks out the correct version as well.
|
||||
|
||||
Next just run `make`:
|
||||
|
||||
~~~
|
||||
% make
|
||||
$ mkdir -p $GOPATH/src/github.com/coredns
|
||||
$ cd $GOPATH/src/github.com/coredns/
|
||||
$ git clone https://github.com/coredns/coredns
|
||||
$ cd coredns
|
||||
$ make
|
||||
~~~
|
||||
|
||||
This should yield a `coredns` binary.
|
||||
|
||||
We vendor most ([not all!](https://github.com/coredns/coredns/issues/1523)) packages. This is mostly because vendoring isn't a perfect solution (in
|
||||
Go). We don't vendor `mholt/caddy` and `miekg/dns` for instance. Using `make` will pull down these
|
||||
dependencies and checks out the correct version as well.
|
||||
|
||||
## Compilation with Docker
|
||||
|
||||
CoreDNS requires Go to compile. However, if you already have docker installed and prefer not to setup
|
||||
|
||||
Reference in New Issue
Block a user