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

Uploaded Python 3

File details

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

File metadata

  • Download URL: verti_osi-1.8.6.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.6.tar.gz
Algorithm Hash digest
SHA256 ff68874a8a82b8b40ee24b69e563de389b94edd760129bb94f43fa9a2609546a
MD5 875e492dcd00e8db6e8993e4ccfd551f
BLAKE2b-256 c2e4ef846a3d1ea3eaf94dd0a78931fd1e816fda38f1433c964094d1787c6b0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: verti_osi-1.8.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 50e13ee71174b69db2c3050a5aa7e9d792f0220215198d559b7cbf37e168cfe7
MD5 2adc683cb00c80bb771bb4c7c8052ba5
BLAKE2b-256 04453b800ee09925af9945bace528161fb8f8af15c0cc899821e69a8b75010a8

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