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 --versionIf 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
- Docker: Ensure the daemon is running:
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:dockerorpodman. Default:docker--output- Output type:tar,registry, orstandard. Default:standard--delete-generated-dockerfile- Deletes Dockerfile after build. Default:False--run-generated-image- Runs image after build. Default:False--file-dir- Directory path containingverti-osi.yamlconfig--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.txtorpyproject.tomlexists. - Node.js: Detected if
package.jsonis 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file verti_osi-1.8.7.tar.gz.
File metadata
- Download URL: verti_osi-1.8.7.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60007398b2a3e0e670de5acbe1ad18f667aadcfcb12f37c3d005c6ffdd2056c5
|
|
| MD5 |
e1bb8f04469a681cfa950f5f65a39d71
|
|
| BLAKE2b-256 |
bbb174ed1ea6efb99d3b844802377f4a7c869ca252abf91a7557ecb9eb2616b2
|
File details
Details for the file verti_osi-1.8.7-py3-none-any.whl.
File metadata
- Download URL: verti_osi-1.8.7-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2409afb696c3b65b8f4a7020821466753d041520c598bb3bbf1acf960e4104fd
|
|
| MD5 |
411594c0f3394dfa985abc1ba43ca401
|
|
| BLAKE2b-256 |
d67b190660f8ddeac76defafe8e768294b09356cbff04f93f5da252c1895dab7
|