Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Latest commit

 

History

History
100 lines (68 loc) · 3.58 KB

File metadata and controls

100 lines (68 loc) · 3.58 KB

Install and update

You can use a pre-built executable file or build it from the source code. Currently, we provide pre-built files only for Linux/amd64 and Linux/aarch64 environments.

Method 1: Install pre-built executable using cargo-binstall

⚠️ Do not confuse with cargo install (build from source).

# 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 fishctl --git https://firefish.dev/firefish/fishctl.git

You can update the package using the same command and uninstall it using cargo uninstall.

# update
cargo binstall fishctl --git https://firefish.dev/firefish/fishctl.git

# uninstall
cargo uninstall fishctl

If you see this warning at cargo-binstall installation, make sure that you have /path/to/.cargo/bin directory in your PATH environment variable.

Your path is missing /path/to/.cargo/bin, you might want to add it.

Alternatively, you can run fishctl as /path/to/.cargo/bin/fishctl (replacing /path/to/.cargo/bin with the one in the warning message).

# fishctl --help
/path/to/.cargo/bin/fishctl --help

Method 2: Download pre-built executable file

You can also download the pre-built executable file from the package registry, but you need to manage and update the executable file on your own.

Method 3: Install from source

# Build from source
cargo install --locked --git https://firefish.dev/firefish/fishctl.git

You can update the package using the same command and uninstall it using cargo uninstall.

# update
cargo install --locked --git https://firefish.dev/firefish/fishctl.git

# uninstall
cargo uninstall fishctl

If you see this warning on installation, make sure that you have /path/to/.cargo/bin directory in your PATH environment variable.

warning: be sure to add `/path/to/.cargo/bin` to your PATH to be able to run the installed binaries

Alternatively, you can run fishctl as /path/to/.cargo/bin/fishctl (replacing /path/to/.cargo/bin with the one in the warning message).

# fishctl --help
/path/to/.cargo/bin/fishctl --help

Method 4: Use pre-built OCI image

Using registry.firefish.dev/firefish/fishctl image, fishctl ___ commands can be executed as

# 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 \
  registry.firefish.dev/firefish/fishctl ___

# or

podman run -it --rm --volume "$(pwd)":/firefish --network network_name \
  registry.firefish.dev/firefish/fishctl ___

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