|
| 1 | +# Installation |
| 2 | + |
| 3 | +Dex ships as a single binary without any external dependencies making the installation very simple. |
| 4 | + |
| 5 | +Dex is available for all major platforms (e.g., macOS, Windows, Linux, OpenBSD, FreeBSD, etc.) |
| 6 | + |
| 7 | +Approaches to install Dex: |
| 8 | + |
| 9 | +1. Using a [pre-compiled binary](#binary-cross-platform) |
| 10 | +2. Installing with [package manager](#homebrew) |
| 11 | +3. Installing from [source](#building-from-source) |
| 12 | +4. Installing with [Docker](#using-docker-image) |
| 13 | + |
| 14 | +## Binary (Cross-platform) |
| 15 | + |
| 16 | +Download the appropriate version for your platform from [releases](https://github.com/odpf/dex/releases) page. Once |
| 17 | +downloaded, the binary can be run from anywhere. You don’t need to install it into a global location. This works well |
| 18 | +for shared hosts and other systems where you don’t have a privileged account. Ideally, you should install it somewhere |
| 19 | +in your PATH for easy use. `/usr/local/bin` is the most probable location. |
| 20 | + |
| 21 | +## Homebrew |
| 22 | + |
| 23 | +```sh |
| 24 | +# Install dex (requires homebrew installed) |
| 25 | +brew install odpf/taps/dex |
| 26 | + |
| 27 | +# Upgrade dex (requires homebrew installed) |
| 28 | +brew upgrade dex |
| 29 | + |
| 30 | +# Check for installed dex version |
| 31 | +dex version |
| 32 | +``` |
| 33 | + |
| 34 | +## Building from source |
| 35 | + |
| 36 | +To compile from source, you will need [Go](https://golang.org/) installed in your `PATH`. |
| 37 | + |
| 38 | +```bash |
| 39 | +# Clone the repo |
| 40 | +https://github.com/odpf/dex.git |
| 41 | + |
| 42 | +# Build dex binary file |
| 43 | +make build |
| 44 | + |
| 45 | +# Check for installed dex version |
| 46 | +./dex version |
| 47 | +``` |
| 48 | + |
| 49 | +## Using Docker image |
| 50 | + |
| 51 | +Dex ships a Docker image [odpf/dex](https://hub.docker.com/r/odpf/dex) that enables you to use `dex` as part of your Docker workflow. |
| 52 | + |
| 53 | +For example, you can run `dex version` with this command: |
| 54 | + |
| 55 | +```bash |
| 56 | +docker run odpf/dex version |
| 57 | +``` |
0 commit comments