From cd80a7f157cc17fa2bab77faed89cedadf04171c Mon Sep 17 00:00:00 2001 From: Jeffrey Cafferata Date: Tue, 1 Nov 2022 20:13:53 +0100 Subject: [PATCH] DOCS: Aligned/improved installation section package manager (#1788) --- README.md | 55 +---------------------------------------- docs/getting-started.md | 52 +++++++++++++++++++++++--------------- 2 files changed, 33 insertions(+), 74 deletions(-) diff --git a/README.md b/README.md index a85fed115..70e6df3a8 100644 --- a/README.md +++ b/README.md @@ -139,60 +139,7 @@ See [Getting Started](https://stackexchange.github.io/dnscontrol/getting-started ## Installation -### From source - -DNSControl can be built with Go version 1.16 or higher. - -The `go get` command will download the source, compile it, and -install `dnscontrol` in your `$GOBIN` directory. - -To install, simply run - -```shell -GO111MODULE=on go install github.com/StackExchange/dnscontrol/v3@latest -``` - -To download the source - -```shell -git clone https://github.com/StackExchange/dnscontrol.git -``` - -If these don't work, more info is in [#805](https://github.com/StackExchange/dnscontrol/issues/805). - -### Via packages - -Get prebuilt binaries from [GitHub releases](https://github.com/StackExchange/dnscontrol/releases/latest). - -Alternatively, on Mac you can install it using Homebrew or MacPorts: - -```bash -# Homebrew -brew install dnscontrol - -# MacPorts -sudo port install dnscontrol -```` - -## Via [Docker](https://hub.docker.com/r/stackexchange/dnscontrol/) - -```bash -docker run --rm -it -v $(pwd)/dnsconfig.js:/dns/dnsconfig.js -v $(pwd)/creds.json:/dns/creds.json stackexchange/dnscontrol preview -``` - -The documentation can be viewed via Docker: - -```bash -cd docs -./runDocker.sh -``` - -FYI: Alternative Docker command: -```bash -docker run --rm -it --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/local/bundle" --env JEKYLL_ENV=production jekyll/jekyll:3.8 jekyll build -V -# Open docs/_site/index.html in your web browser to see the results. -# (Note: The preview isn't perfect. Links that use the site.github.url variable won't work. -``` +DNSControl can be installed via packages for macOS, Linux and Windows, or from source code. See the [official instructions](https://stackexchange.github.io/dnscontrol/getting-started#1-install-the-software). ## Via GitHub Actions (GHA) diff --git a/docs/getting-started.md b/docs/getting-started.md index ca6060f7d..757f7c041 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -7,9 +7,39 @@ title: Getting Started ## 1. Install the software -## From source +Choose one of the following installation methods: -DNSControl can be built with Go version 1.18 or higher. +### Homebrew + +On macOS (or Linux) you can install it using [Homebrew](https://brew.sh). + +```bash +brew install dnscontrol +``` + +### MacPorts + +Alternatively on macOS you can install it using [MacPorts](https://www.macports.org). + +```bash +sudo port install dnscontrol +```` + +### Docker + +You can use DNSControl locally using the Docker image from [Docker hub](https://hub.docker.com/r/stackexchange/dnscontrol/) and the command below. + +```bash +docker run --rm -it -v $(pwd)/dnsconfig.js:/dns/dnsconfig.js -v $(pwd)/creds.json:/dns/creds.json stackexchange/dnscontrol preview +``` + +### Binaries + +Download binaries from [GitHub](https://github.com/StackExchange/dnscontrol/releases/latest) for Linux (binary, tar, RPM, DEB), FreeBSD (tar), Windows (exec, ZIP) for 32-bit, 64-bit, and ARM. + +### Source + +DNSControl can be built from source with Go version 1.18 or higher. The `go install` command will download the source, compile it, and install `dnscontrol` in your `$GOBIN` directory. @@ -24,24 +54,6 @@ To download the source If these don't work, more info is in [#805](https://github.com/StackExchange/dnscontrol/issues/805). ---- - - -## Via packages - -Get prebuilt binaries from [GitHub releases](https://github.com/StackExchange/dnscontrol/releases/latest) - -Alternatively, on Mac you can install it using homebrew: - -`brew install dnscontrol` - -## Via [Docker](https://hub.docker.com/r/stackexchange/dnscontrol/) - -```bash -docker run --rm -it -v $(pwd)/dnsconfig.js:/dns/dnsconfig.js -v $(pwd)/creds.json:/dns/creds.json stackexchange/dnscontrol preview -``` - - ## 2. Create a place for the config files Create a directory where you'll be storing your configuration files.