Skip to content

Building your SaaS Product using Container Image

This guide shows you how to build and deploy services on Omnistrate using container images. The omctl build command with the --image flag allows you to quickly deploy any containerized application as a SaaS offering.

Prerequisites

  1. Omnistrate Account: Sign up at omnistrate.cloud
  2. Omnistrate CLI: Install from ctl.omnistrate.cloud/install
  3. Reference to Container image: Container image published on a standard registry

Overview

Building from a container image is a simple way to start if your service has a single component and can be configured through environment variables or runtime parameters. This approach allows you to deploy any Docker image as a managed service with just a single command, making it the most straightforward path to getting your service running on Omnistrate.

Why it's perfect for single-component services:

  • Simplicity: No need to define complex multi-service architectures or dependencies
  • Configuration flexibility: Services can be easily configured through environment variables
  • Immediate deployment: Go from container image to running service in minutes
  • Minimal setup: Requires only the image reference and basic configuration

This approach is ideal for:

  • Stateless applications: Web servers, APIs, microservices that don't require persistent storage
  • Database services: Single-instance databases like MySQL, PostgreSQL, Redis that can be configured via environment variables
  • Processing services: Background workers, data processors, or batch job services
  • Quick prototyping and testing: Rapidly deploy and test containerized applications
  • Existing containerized applications: Deploy applications that are already packaged as Docker images
  • Getting familiar with Omnistrate's capabilities: Learn the platform with minimal complexity

When to choose this approach:

  • Your service runs as a single container
  • Configuration can be handled through environment variables
  • You don't need complex networking between multiple components
  • You want the fastest path from development to deployment

Basic Usage

Public Container Image

To build a service from a public container image:

omctl build --image <image-url> --product-name "<service-name>" [options]

Private Container Image

For private registries, include authentication credentials:

omctl build --image <image-url> --product-name "<service-name>" \
  --image-registry-auth-username <username> \
  --image-registry-auth-password <password> \
  [options]

Examples

Example 1: MySQL Database Service

Deploy a MySQL database service in the development environment:

omctl build --image docker.io/mysql:5.7 \
  --product-name MySQL \
  --env-var "MYSQL_ROOT_PASSWORD=password" \
  --env-var "MYSQL_DATABASE=mydb"

This command:

  • Uses the official MySQL 5.7 image from Docker Hub
  • Creates a service named "MySQL"
  • Sets required environment variables for MySQL configuration
  • Deploys to the default "Dev" environment

Example 2: Private Registry Service

Deploy a service from a private container registry:

omctl build --image docker.io/namespace/my-image:v1.2 \
  --product-name "My Service" \
  --image-registry-auth-username username \
  --image-registry-auth-password password \
  --env-var KEY1=VALUE1 \
  --env-var KEY2=VALUE2

This command:

  • Uses a private image from a custom namespace
  • Provides registry authentication credentials
  • Sets multiple environment variables
  • Creates a service named "My Service"

For more complex deployments, consider: