fishctl/docs/install.md

63 lines
2.2 KiB
Markdown
Raw Permalink Normal View History

2024-07-01 14:26:16 +09:00
# Install and update
2024-07-01 14:42:39 +09:00
## Method 1: Install pre-built executable using [cargo-binstall](https://github.com/cargo-bins/cargo-binstall)
2024-07-01 14:26:16 +09:00
```sh
# If you don't have cargo-binstall, install it first
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
# Install pre-built executable
cargo binstall --git https://firefish.dev/firefish/fishctl.git
```
You can update the package using the same command.
```sh
cargo binstall --git https://firefish.dev/firefish/fishctl.git
```
2024-07-01 14:42:39 +09:00
## Method 2: Download pre-built executable file
2024-07-01 14:26:16 +09:00
2024-07-01 14:43:30 +09:00
You can also download the pre-built executable file from the [release page](https://firefish.dev/firefish/fishctl/-/releases), but you need to manage and update the executable file on your own.
2024-07-01 14:26:16 +09:00
2024-07-01 14:42:39 +09:00
## Method 3: Install from source
2024-07-01 14:26:16 +09:00
```sh
# Build from source
cargo install --locked --git https://firefish.dev/firefish/fishctl.git
```
You can update the package using the same command.
```sh
cargo install --locked --git https://firefish.dev/firefish/fishctl.git
```
2024-07-01 14:42:39 +09:00
## Method 4: Use pre-built OCI image
2024-07-01 14:26:16 +09:00
Using the `registry.firefish.dev/firefish/fishctl` container image, `fishctl ___` commands can be executed as
```sh
# Assuming that $(pwd) (current directory) is the parent of the config directory
# (i.e., the Firefish local repository directory)
docker run -it --rm --volume "$(pwd)":/firefish --network network_name \
2024-07-02 00:48:30 +09:00
registry.firefish.dev/firefish/fishctl ___
2024-07-01 14:26:16 +09:00
# or
podman run -it --rm --volume "$(pwd)":/firefish --network network_name \
2024-07-02 00:48:30 +09:00
registry.firefish.dev/firefish/fishctl ___
2024-07-01 14:26:16 +09:00
```
Where `network_name` is the network name on which the database is running. If you want to use this for the host network (i.e., use the container as if it were a locally installed command), you should replace `network_name` with `host`.
If you are using a container network (which is typically the case if you are using `compose.yml` or `docker-compose.yml` to run Firefish), you need to search for your network name by `docker network ls` or `podman network ls`:
```
$ podman network ls # the network name is `firefish_calcnet` in this case
NETWORK ID NAME DRIVER
0060ac847249 firefish_calcnet bridge
2f259bab93aa podman bridge
```