2021-06-02 16:53:39 +02:00
|
|
|
---
|
2021-07-16 18:37:29 +02:00
|
|
|
slug: /1001/install/
|
2021-06-02 16:53:39 +02:00
|
|
|
---
|
|
|
|
|
2021-05-26 00:56:30 +02:00
|
|
|
# Install Dagger
|
2021-03-18 06:44:50 +01:00
|
|
|
|
2021-05-26 00:14:17 +02:00
|
|
|
## Option 1: Use Homebrew (Mac OS only)
|
2021-03-18 06:44:50 +01:00
|
|
|
|
2021-05-04 02:21:47 +02:00
|
|
|
From your Mac OS terminal, run the following command:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
brew install dagger/tap/dagger
|
2021-03-18 06:44:50 +01:00
|
|
|
```
|
2021-05-04 02:21:47 +02:00
|
|
|
|
2021-05-08 00:10:58 +02:00
|
|
|
If dagger is already installed, you can upgrade it using this command:
|
|
|
|
|
|
|
|
```shell
|
2021-08-16 17:52:53 +02:00
|
|
|
brew update
|
|
|
|
brew upgrade dagger
|
2021-05-08 00:10:58 +02:00
|
|
|
```
|
|
|
|
|
2021-05-26 00:14:17 +02:00
|
|
|
## Option 2: Run a shell script
|
2021-05-04 02:21:47 +02:00
|
|
|
|
|
|
|
From a terminal, run the following command:
|
|
|
|
|
|
|
|
```shell
|
2021-05-06 19:20:56 +02:00
|
|
|
curl -sfL https://releases.dagger.io/dagger/install.sh | sh
|
2021-03-18 06:44:50 +01:00
|
|
|
```
|
|
|
|
|
2021-05-04 02:21:47 +02:00
|
|
|
You now have the dagger binary in the local directory under `./bin/dagger`.
|
|
|
|
|
|
|
|
You can then install it globally on your system:
|
2021-03-18 06:44:50 +01:00
|
|
|
|
2021-05-04 02:21:47 +02:00
|
|
|
```shell
|
|
|
|
sudo mv ./bin/dagger /usr/local/bin
|
2021-03-18 06:44:50 +01:00
|
|
|
```
|
2021-05-04 02:21:47 +02:00
|
|
|
|
2021-06-30 16:31:06 +02:00
|
|
|
## Option 2 (Windows): Run a shell script
|
|
|
|
|
|
|
|
From a terminal, run the following command:
|
|
|
|
|
|
|
|
```shell
|
2021-06-30 17:54:12 +02:00
|
|
|
curl https://releases.dagger.io/dagger/install.ps1 -OutFile install.ps1 ; ./install.ps1; rm install.ps1
|
2021-06-30 16:31:06 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
We try to move the dagger binary under `C:\Windows\System32` but
|
|
|
|
in case use missing the necessary permission we'll save everything under `<your home folder>/dagger`
|
|
|
|
|
2021-05-26 00:14:17 +02:00
|
|
|
## Option 3: Download a binary release
|
2021-05-04 02:21:47 +02:00
|
|
|
|
|
|
|
Open your web browser to [the latest release](https://github.com/dagger/dagger/releases/latest).
|
|
|
|
|
|
|
|
From the **assets** section, download the archive corresponding to your OS and Arch.
|
|
|
|
|
2021-05-26 00:14:17 +02:00
|
|
|
## Option 4: Install from source
|
2021-05-04 02:21:47 +02:00
|
|
|
|
|
|
|
You will need [Go](https://golang.org) version 1.16 or later.
|
|
|
|
|
2021-05-22 00:02:18 +02:00
|
|
|
1\. Clone the dagger repository
|
2021-05-04 02:21:47 +02:00
|
|
|
|
|
|
|
```shell
|
|
|
|
git clone https://github.com/dagger/dagger.git
|
|
|
|
```
|
|
|
|
|
2021-05-22 00:02:18 +02:00
|
|
|
2\. Build the `dagger` binary.
|
2021-05-04 02:21:47 +02:00
|
|
|
|
|
|
|
```shell
|
|
|
|
cd dagger; make
|
2021-03-18 06:44:50 +01:00
|
|
|
```
|
|
|
|
|
2021-05-22 00:02:18 +02:00
|
|
|
3\. Copy the `dagger` tool to a location listed in your `$PATH`. For example, to copy it to `/usr/local/bin`:
|
2021-05-04 02:21:47 +02:00
|
|
|
|
|
|
|
```shell
|
|
|
|
cp ./cmd/dagger/dagger /usr/local/bin
|
|
|
|
```
|
2021-12-02 17:10:44 +01:00
|
|
|
|
|
|
|
## Enable autocompletion manually
|
|
|
|
|
|
|
|
You can generate an auto completion script using `dagger completion <your shell>`
|
|
|
|
|
|
|
|
```sh
|
|
|
|
Usage:
|
|
|
|
dagger completion [command]
|
|
|
|
|
|
|
|
Available Commands:
|
|
|
|
bash generate the autocompletion script for bash
|
|
|
|
fish generate the autocompletion script for fish
|
|
|
|
powershell generate the autocompletion script for powershell
|
|
|
|
zsh generate the autocompletion script for zsh
|
|
|
|
```
|
|
|
|
|
|
|
|
Depending on your shell, add the output script belong your other completions' script.
|