ThreeFold Flist CLI to turn Dockerfile+Docker Images into Flist on the TF Flist Hub
Go to file
2024-09-30 18:49:50 -04:00
.gitignore first version of flist cli 2024-09-26 21:39:17 -04:00
flist.sh updated presentation 2024-09-30 18:49:50 -04:00
LICENSE first version of flist cli 2024-09-26 21:39:17 -04:00
README.md Update README.md 2024-09-27 16:33:11 +00:00

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.

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 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: Build and push a Docker image to Docker Hub, then convert and push it as an flist to Flist Hub
  • delete: Delete an flist from Flist Hub
  • rename: Rename an flist in Flist Hub
  • help: Display help information

Examples

  1. Install the CLI:

    bash flist.sh install
    
  2. Log in:

    flist login
    
  3. Push a Docker image and convert it to an flist:

    flist push myimage:latest
    
  4. Delete an flist:

    flist delete myflist.flist
    
  5. Rename an flist:

    flist rename old_name.flist new_name.flist
    
  6. Log out:

    flist logout
    
  7. Display help information:

    flist help
    
  8. 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.