2021-05-08 00:10:58 +02:00
|
|
|
# Installing or upgrading Dagger
|
2021-03-18 06:44:50 +01:00
|
|
|
|
2021-05-06 19:20:56 +02:00
|
|
|
## Summary
|
|
|
|
|
2021-05-08 00:10:58 +02:00
|
|
|
- [Installing or upgrading Dagger](#installing-or-upgrading-dagger)
|
|
|
|
- [Summary](#summary)
|
|
|
|
- [Option 1 (Mac OS only): install or upgrade from Homebrew](#option-1-mac-os-only-install-or-upgrade-from-homebrew)
|
|
|
|
- [Option 2: install or upgrade from a shell script](#option-2-install-or-upgrade-from-a-shell-script)
|
|
|
|
- [Option 3: Manually fetch the latest binary release from Github](#option-3-manually-fetch-the-latest-binary-release-from-github)
|
|
|
|
- [Option 4: Compile from source](#option-4-compile-from-source)
|
|
|
|
|
|
|
|
## Option 1 (Mac OS only): install or upgrade from Homebrew
|
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
|
|
|
|
brew update; brew upgrade dagger
|
|
|
|
```
|
|
|
|
|
2021-05-06 19:20:56 +02:00
|
|
|
> :bulb: Verify the installation with `dagger version`.
|
|
|
|
|
2021-05-08 00:10:58 +02:00
|
|
|
## Option 2: install or upgrade from 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-05-06 19:20:56 +02:00
|
|
|
> :bulb: Verify the installation with `dagger version`.
|
|
|
|
|
2021-05-04 02:21:47 +02:00
|
|
|
## Option 3: Manually fetch the latest binary release from Github
|
|
|
|
|
|
|
|
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-06 19:20:56 +02:00
|
|
|
> :bulb: Verify the installation with `dagger version`.
|
|
|
|
|
2021-05-04 02:21:47 +02:00
|
|
|
## Option 4: Compile from source
|
|
|
|
|
|
|
|
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-05-06 19:20:56 +02:00
|
|
|
|
2021-05-08 00:10:58 +02:00
|
|
|
> :bulb: Verify the installation with `dagger version`.
|