-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
building from external repo doesn't work #253
Comments
Adding the following import fixes the problem: import _ "github.com/coredns/coredns/core/plugin" This should probably be added to the manual (https://coredns.io/2017/07/25/compile-time-enabling-or-disabling-plugins/#build-with-external-golang-source-code). |
Thanks! At face value this seems right, but on further consideration ...
This import will compile in all of coredns' default plugins. They won't be usable if not also added to the directives list, but their packages will be built into the resulting binary. To leave unused/unwanted plugins out of the binary (e.g. if the goal is to trim down the size of the binary), only the plugins needed should be included.
When running coredns without a Corefile, coredns runs with a stub configuration that includes log and whoami. Hence, the error if those plugins are not included and no Corefile exists. Running coredns without a Corefile is not an important function, so compiling without log or whoami is valid. |
What happened:
In preparation for adding my own plugin as described in https://coredns.io/2017/07/25/compile-time-enabling-or-disabling-plugins/#build-with-external-golang-source-code I build coredns from an external repo (see code below). There's no Corefile in the directory.
What you expected to happen:
I expected coredns to start.
How to reproduce it (as minimally and precisely as possible):
Using coredns v1.9.0.
Anything else we need to know?:
Environment:
cat /etc/os-release
): OSX (m1 mbp)The text was updated successfully, but these errors were encountered: