ThreeFold Flist CLI in V to turn Dockerfile+Docker Images into Flist on the TF Flist Hub
.gitignore | ||
flist.v | ||
LICENSE | ||
Makefile | ||
README.md |
Flist CLI in Vlang
Table of Contents
- Introduction
- Installation
- Usage
- OS-Specific Instructions
- Troubleshooting
- Development
- Contributing
- 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 (latest version) installed on your system
- Docker installed and running
- Docker Hub account
- TF Hub account and token
Building and Installing
-
Clone this repository, build the project, run the install command and set the CLI to your path:
git clone https://github.com/yourusername/flist-cli.git cd flist-cli v -o flist . sudo ./flist install
This will copy the
flist
executable to the appropriate system location.
Rebuild Locally
You can use the Makefile command to uninstall and reinstall the binary:
make build
Usage
After installation, you can use the flist
command followed by various subcommands:
flist <command> [arguments]
Available commands:
install
: Install the Flist CLIuninstall
: Uninstall the Flist CLIlogin
: Log in to Docker Hub and save the Flist Hub tokenlogout
: Log out of Docker Hub and remove the Flist Hub tokenpush <image>:<tag>
: Build and push a Docker image, then convert and push it as an flistdelete <flist_name>
: Delete an flist from Flist Hubrename <flist_name> <new_flist_name>
: Rename an flist in Flist Hubhelp
: Display help information
OS-Specific Instructions
Windows
- Run Command Prompt or PowerShell as Administrator.
- Ensure Docker Desktop is installed and running.
- Use a Docker-enabled terminal for all Docker-related commands.
- The
flist
executable will be installed to:C:\Program Files\flist\flist.exe
macOS and Linux
- Ensure Docker is installed and the Docker daemon is running.
- The
flist
executable will be installed to:/usr/local/bin/flist
- You may need to use
sudo
for installation and certain operations:sudo ./flist install sudo flist uninstall sudo flist <command>
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.
Development
To modify the Flist CLI:
- Make your changes to the
flist.v
file. - Rebuild the project using
v -o flist .
- Test your changes thoroughly across different operating systems if possible.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.