135 lines
3.2 KiB
Markdown
135 lines
3.2 KiB
Markdown
<h1> Flist CLI in Vlang </h1>
|
|
|
|
<h2>Table of Contents</h2>
|
|
|
|
- [Introduction](#introduction)
|
|
- [Installation](#installation)
|
|
- [Prerequisites](#prerequisites)
|
|
- [Building and Installing](#building-and-installing)
|
|
- [Rebuild and Uninstall](#rebuild-and-uninstall)
|
|
- [Usage](#usage)
|
|
- [OS-Specific Instructions](#os-specific-instructions)
|
|
- [Linux](#linux)
|
|
- [macOS](#macos)
|
|
- [Windows](#windows)
|
|
- [Troubleshooting](#troubleshooting)
|
|
- [Development](#development)
|
|
- [Contributing](#contributing)
|
|
- [License](#license)
|
|
|
|
---
|
|
|
|
## Introduction
|
|
|
|
Flist CLI is a tool that turns Dockerfiles and Docker images directly into Flist on the TF Flist Hub, passing through Docker Hub.
|
|
|
|
## Installation
|
|
|
|
### Prerequisites
|
|
|
|
- [V programming language](https://vlang.io/) (latest version) installed on your system
|
|
- Docker Engine installed and running (Linux)
|
|
- Docker Desktop installed and running (MacOS+Windows)
|
|
- Docker Hub account
|
|
- TF Hub account and token
|
|
|
|
### Building and Installing
|
|
|
|
- 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 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
|
|
|
|
After installation, you can use the `flist` command followed by various subcommands:
|
|
|
|
```
|
|
flist <command> [arguments]
|
|
```
|
|
|
|
Run `flist` or `flist help` to see all available commands for your specific OS.
|
|
|
|
## OS-Specific Instructions
|
|
|
|
### Linux
|
|
|
|
1. Ensure Docker Engine is installed and running.
|
|
2. The `flist` executable will be installed to:
|
|
```
|
|
/usr/local/bin/flist
|
|
```
|
|
|
|
### macOS
|
|
|
|
1. Ensure Docker Desktop is installed and running.
|
|
2. The `flist` executable will be installed to:
|
|
```
|
|
/usr/local/bin/flist
|
|
```
|
|
|
|
### Windows
|
|
|
|
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).
|
|
- 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. 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 using the appropriate Make command.
|
|
3. Test your changes thoroughly across different operating systems if possible.
|
|
|
|
## Contributing
|
|
|
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
|
## License
|
|
|
|
[Apache 2.0 License](LICENSE) |