ThreeFold Flist CLI to turn Dockerfile+Docker Images into Flist on the TF Flist Hub
.gitignore | ||
flist.sh | ||
LICENSE | ||
README.md |
Flist CLI
Table of Contents
Introduction
Flist CLI is a command-line tool that simplifies the process of turning Dockerfiles and Docker images into Flists on the TF Flist Hub, using Docker Hub as an intermediary.
Prerequisites
- This tool has been built for Linux Ubuntu.
- Ensure you have Docker installed and configured on your system.
- You'll need a Docker Hub account and a TF Flist Hub token to use this tool.
- The tool stores your TF Flist Hub token in
~/.config/tfhubtoken
. Keep this file secure.- You can run
flist logout
to remove this file and log out from Docker.
- You can run
Installation
To install the Flist CLI, clone the repository, navigate to the cloned directory and install the tool:
git clone https://git.ourworld.tf/tfgrid/flist_cli.git
cd flist_cli
bash flist.sh install
This will create an executable named flist
in /usr/local/bin/
.
Uninstallation
To uninstall the Flist CLI, run:
flist uninstall
Usage
The Flist CLI provides several 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
: Build and push a Docker image to Docker Hub, then convert and push it as an flist to Flist Hubdelete
: Delete an flist from Flist Hubrename
: Rename an flist in Flist Hubhelp
: Display help information
Examples
-
Install the CLI:
bash flist.sh install
-
Log in:
flist login
-
Push a Docker image and convert it to an flist:
flist push myimage:latest
-
Delete an flist:
flist delete myflist.flist
-
Rename an flist:
flist rename old_name.flist new_name.flist
-
Log out:
flist logout
-
Display help information:
flist help
-
Uninstall the CLI:
flist uninstall
Support
If you encounter any issues or have questions, please open an issue on the Gitea repository.
References
- This work is done for ThreeFold in collaboration with Scott Yeager, see this story for context.
- The script is based on Scott's first version here.