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.1.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.1-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for verti_osi-1.8.1.tar.gz
Algorithm Hash digest
SHA256 ccbac1a2afd4157515b0ecf6bb7a4211cb2f3023776321b2a305c5041821c3d1
MD5 6f34cf285331d1313b8a00428ccae182
BLAKE2b-256 28646d039df982f6eaf2b409329eae3c59e0bfbe693d9dddd21961a19b31f690

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for verti_osi-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82475688993b50896602b1e5f2537525fa8d6303fcc3665416f505863fc1b0a3
MD5 61a14795fc95a029db25c2fcd3e4787a
BLAKE2b-256 5a08e4c0f94fe5f0c337a2baf770672add74f10d0aec46e6c3d9029544d21389

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