finalized readme for win mac linux

This commit is contained in:
mik-tf 2024-10-10 10:42:44 -04:00
parent 6d0781cdc4
commit b7f793c8d1

View File

@ -8,13 +8,10 @@
- [Building and Installing](#building-and-installing)
- [Rebuild and Uninstall](#rebuild-and-uninstall)
- [Usage](#usage)
- [Commands](#commands)
- [OS-Specific Instructions](#os-specific-instructions)
- [Linux](#linux)
- [macOS](#macos)
- [Windows](#windows)
- [WSL](#wsl)
- [Native Windows](#native-windows)
- [Troubleshooting](#troubleshooting)
- [Development](#development)
- [Contributing](#contributing)
@ -31,34 +28,52 @@ Flist CLI is a tool that turns Dockerfiles and Docker images directly into Flist
### Prerequisites
- [V programming language](https://vlang.io/) (latest version) installed on your system
- Docker installed and running
- Docker Engine installed and running (Linux)
- Docker Desktop installed and running (MacOS+Windows)
- Docker Hub account
- TF Hub account and token
### Building and Installing
Clone this repository, build the project, and install the CLI:
```
git clone https://git.ourworld.tf/tfgrid/flist_cli_v
cd flist_cli_v
make build
```
- To clone this repository, build the project, and install the CLI:
- MacOS and Linux
```
git clone https://git.ourworld.tf/tfgrid/flist_cli_v
cd flist_cli_v
make build
```
- Windows
```
git clone https://git.ourworld.tf/tfgrid/flist_cli_v
cd flist_cli_v
make build-win
```
This will build the `flist` executable and install it to the appropriate system location.
This will build the executable and install it to the appropriate system location.
### Rebuild and Uninstall
You can use the following Makefile commands:
- To rebuild and reinstall:
- MacOS and Linux
```
make rebuild
```
- Windows
```
make rebuild-win
```
- To uninstall and remove the binary:
- MacOS and Linux
```
make delete
```
- Windows
```
make delete-win
```
## Usage
@ -68,24 +83,13 @@ After installation, you can use the `flist` command followed by various subcomma
flist <command> [arguments]
```
## Commands
- `install`: Install the Flist CLI
- `uninstall`: Uninstall the Flist CLI
- `login`: Log in to Docker Hub and save the Flist Hub token
- `logout`: Log out of Docker Hub and remove the Flist Hub token
- `push <image>:<tag>`: Build and push a Docker image, then convert and push it as an flist
- `delete <flist_name>`: Delete an flist from Flist Hub
- `rename <flist_name> <new_flist_name>`: Rename an flist in Flist Hub
- `ls`: List all flists of the current user
- `ls url`: List all flists of the current user with full URLs
- `help`: Display help information
Run `flist` or `flist help` to see all available commands for your specific OS.
## OS-Specific Instructions
### Linux
1. Ensure Docker is installed and the Docker daemon is running.
1. Ensure Docker Engine is installed and running.
2. The `flist` executable will be installed to:
```
/usr/local/bin/flist
@ -101,39 +105,25 @@ flist <command> [arguments]
### Windows
#### WSL
You can use WSL with Ubuntu to deploy the Flist CLI on Windows.
#### Native Windows
When using the make commands, add `-win` to the commands: `make build-win`, `make rebuild-win`, `make delete-win`.
- Run make for Windows on Powershell Admin:
```
git clone https://git.ourworld.tf/tfgrid/flist_cli_v
cd flist_cli_v
make build-win
```
- Run in Powershell Admin the following lines then restart the shell
```
$newPath = 'C:\Program Files\flist'
setx PATH "$($env:PATH);$newPath"
```
1. Ensure Docker Desktop is installed and running.
2. Run the program and installer in an admin PowerShell.
3. The `flist.exe` executable will be installed to:
```
C:\\Program Files\\flist\\flist.exe
```
## Troubleshooting
- If you encounter permission issues, ensure you're running the command with appropriate privileges (e.g., as administrator on Windows or with `sudo` on Unix-like systems).
- Make sure Docker is running before using Flist CLI commands.
- If you face issues with Docker commands, try logging out and logging back in to refresh your Docker credentials.
- If you encounter compilation errors, ensure you have the latest version of V installed.
- If you encounter compilation errors, ensure you have the latest version of V installed. To update v, run `v up`.
## Development
To modify the Flist CLI:
1. Make your changes to the `flist.v` file.
2. Rebuild the project using `make rebuild`
2. Rebuild the project using using the appropriate Make command.
3. Test your changes thoroughly across different operating systems if possible.
## Contributing