Skip to main content

A CLI tool for generating OCI-compliant container images for Python and Node.js projects.

Project description

Verti-OSI CLI Tool Documentation

Overview

Verti-OSI is a command-line tool designed to generate OCI-compliant container images. It allows users to create container images from a specified project source directory while offering various customization options such as selecting the container runtime daemon, output type, and execution of the generated image.

Supported Languages

Currently, verti-osi supports Python and Node.js projects. The CLI automatically detects the language package manager and generates the appropriate container image.

Prerequisites

To use verti-osi, ensure the following:

  • Python 3.7+ installed. Check with:

    python --version
    
  • PIPX installed. Check with:

    pipx --version
    

    If missing, install it via:

    python -m pip install --user pipx
    pipx ensurepath
    
  • A running container daemon (Docker or Podman)

    • Docker: Ensure the daemon is running:
      docker info
      
    • Podman: Ensure Podman is installed and running:
      podman info
      

Installation (via pipx)

To install verti-osi globally using pipx, run:

pipx install verti-osi

Usage

After installation, invoke the CLI tool using verti-osi. Below is the command structure and available options.

Command Parameters

verti-osi --root-directory <path> \
          --source-directory <path> \
          --image-name <name> \
          --daemon <daemon-type> \
          --output <output-type> \
          --delete-generated-dockerfile <True/False> \
          --run-generated-image <True/False> \
          --file-dir <path> \
          --platforms <comma-separated-platforms> \
          --repository-branch <branch> \
          --repository-url <url> \
          --env-vars <KEY=VALUE,...> \
          --env-vars-rt <KEY=VALUE,...> \
          --env-vars-bt <KEY=VALUE,...> \
          --pre-build-commands <commands> \
          --build-commands <commands> \
          --port <port-number>

Explanation of Parameters

  • --root-directory - Root directory of the project. Default: .
  • --source-directory - Directory containing source code. Default: .
  • --image-name - Name for the generated image. If empty, auto-generated.
  • --daemon - Container daemon to use: docker or podman. Default: docker
  • --output - Output type: tar, registry, or standard. Default: standard
  • --delete-generated-dockerfile - Deletes Dockerfile after build. Default: False
  • --run-generated-image - Runs image after build. Default: False
  • --file-dir - Directory path containing verti-osi.yaml config
  • --platforms - Supported platforms. e.g., linux/amd64,linux/arm64
  • --repository-branch - Branch name for remote repo
  • --repository-url - Git URL for remote repo
  • --env-vars - List of env vars for all stages. Format: KEY=VALUE
  • --env-vars-rt - Runtime-specific env vars
  • --env-vars-bt - Build-time-specific env vars
  • --pre-build-commands - Commands to run before build
  • --build-commands - Commands to run during build
  • --port - Port to be exposed. Default: 8080

Configuration via YAML

You can also configure your build using a YAML file named verti-osi.yaml.

Use it with the --file-dir flag:

verti-osi --file-dir <path-to-directory>

YAML File Example

image-name: verti-node-app:v1
source-directory: ./src
root-directory: .
delete-generated-dockerfile: true
daemon: docker
output-type: tar
platform:
  - linux/amd64
  - linux/arm64
pre-build:
  - echo "Running pre-build steps"
build:
  - npm run build
env-vars:
  - name: API_KEY
    value: abc123
    type: both
  - name: DEBUG
    value: true
    type: runtime
port: 8080
remote-source-repository:
  git:
    url: https://github.com/example/project
    branch: main

Automatic Language Detection

verti-osi detects the language based on project files:

  • Python: Detected if requirements.txt or pyproject.toml exists.
  • Node.js: Detected if package.json is present.

Example Usages

Generate a container image

verti-osi --root-directory . \
          --source-directory ./src \
          --image-name nodey-js-verti:v1-normal

Generate and push to a registry

verti-osi --root-directory . \
          --source-directory ./src \
          --image-name my-repo/nodey-js-verti:v1 \
          --output registry

Generate and delete Dockerfile

verti-osi --root-directory . \
          --source-directory ./src \
          --image-name nodey-js-verti:v1 \
          --delete-generated-dockerfile True

Generate and run image

verti-osi --root-directory . \
          --source-directory ./src \
          --image-name nodey-js-verti:v1 \
          --run-generated-image True

Generate using YAML config

verti-osi --file-dir ./configs

License

Verti-OSI is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verti_osi-1.8.2.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verti_osi-1.8.2-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file verti_osi-1.8.2.tar.gz.

File metadata

  • Download URL: verti_osi-1.8.2.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for verti_osi-1.8.2.tar.gz
Algorithm Hash digest
SHA256 debc06e47539eff2c4d9476e2a1370160dab7a4511191d0cebbb521a8fdde795
MD5 9c7659537a729e8b23f48b1e240b7bec
BLAKE2b-256 2b82973631dc0447a3d655bdb4aa473406d360fdb67bd9b60f1da18204932aad

See more details on using hashes here.

File details

Details for the file verti_osi-1.8.2-py3-none-any.whl.

File metadata

  • Download URL: verti_osi-1.8.2-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for verti_osi-1.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2d8718e19445e8c169c620c2073bd28ff03c21d77307ef2cbc47d0d37f91008b
MD5 69e9b2266e6df53eab694e5dd51621b4
BLAKE2b-256 ae6c41b3d1d82989f511224cd41c19d7e443a5031a5dba79ad507af7e8804451

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page