Skip to main content

Create a Container

Deploy your first container in minutes.

Prerequisites​

Before creating a container, ensure you have:

  • A project created in your organization
  • A Docker image ready to deploy
  • (Optional) A Docker registry configured for private images

Simple vs Advanced Mode​

The container creation form offers two modes:

  • Simple mode - Streamlined form with four sections: Basic Configuration, Networking, Service Connections, and Resources & Scaling. Ideal for quick deployments.
  • Advanced mode - Adds additional sections: Environment & Files (environment variables, mounted files) and Advanced Settings (health probes, init containers, security context).

Toggle between modes using the Simple / Advanced switch at the top of the creation form.

Step-by-Step Guide​

1. Navigate to Containers​

  1. Select your project from the project switcher
  2. Click Containers in the left sidebar
  3. Click Create Container

2. Basic Configuration​

Container Name​

Enter a unique name for your container. This name is used for:

  • Internal DNS resolution
  • Identification in logs and metrics
  • Gateway routing
Valid: my-app, api-v2, frontend-prod
Invalid: My App, api_v2, frontend.prod
Naming Convention

Use lowercase letters, numbers, and hyphens. Start with a letter.

Docker Image​

Specify the Docker image to deploy:

FormatExample
Docker Hubnginx:latest
Docker Hub (official)library/nginx:1.25
GitHub Registryghcr.io/org/image:tag
GitLab Registryregistry.gitlab.com/org/repo:tag
Custom Registryregistry.example.com/image:tag

For private registries, configure your registry credentials first.

Container Command (Optional)​

Override the command that starts your container. Enter the complete command as you would type it in a terminal — the system parses it into command and arguments. Leave empty to use the command defined in your container image.

Examples:
nginx -g 'daemon off;'
/bin/sh -c 'echo hello && sleep 5'

3. Compute Configuration​

Compute Class​

Select the appropriate compute class for your workload:

ClassCPU:RAM RatioMax ResourcesBest For
Eco1:23 cores, 6 GBDevelopment, testing, budget-conscious workloads
Standard1:415 cores, 58 GBGeneral production workloads
Production1:46 cores, 28 GBSensitive workloads requiring dedicated resources
Prod. Compute1:26 cores, 16 GBCPU-intensive tasks (data processing, APIs)
Prod. Memory1:86 cores, 58 GBMemory-intensive tasks (caching, ML inference)
ARM1:48 cores, 32 GBCost-optimized ARM-based workloads

Resource Allocation​

Within each compute class, configure resources using sliders:

  • CPU: Adjust in increments (varies by class)
  • Memory: Automatically calculated based on CPU:RAM ratio

Example with Standard class (1:4 ratio):

  • 1 vCPU → 4 GB RAM
  • 2 vCPU → 8 GB RAM
  • 4 vCPU → 16 GB RAM
Choosing Resources

Start with Eco class at minimum resources for development. Use Standard or Production classes for production workloads.

Replicas​

Set the number of container instances to run. For high availability, use at least 2 replicas in production.

4. Networking​

Specify which ports your container exposes:

FieldDescription
Container PortThe port your application listens on
ProtocolTCP or UDP
Example: Node.js app listening on port 3000
Container Port: 3000
Protocol: TCP

You can also configure Quick Expose here to automatically create a public URL via a shared gateway during creation.

5. Service Connections​

Connect your container to databases and services in your project. Credentials are automatically injected as environment variables.

  1. Select a service (PostgreSQL, MariaDB, Valkey, NATS, etc.)
  2. The connection details are automatically configured
  3. Environment variables are injected at startup
Automatic Credentials

Service Connections eliminate the need to manually configure database URLs and credentials. The connection variables are managed automatically by SailOps.

6. Resources & Scaling​

See Compute Configuration above for compute class and resource details. This section also includes:

Persistent Volume (Optional)​

Toggle Persistent Volume to attach durable storage to your container:

FieldDescription
Mount PathAbsolute path inside the container (e.g., /data)
Storage ClassStandard (5K IOPS) or Performance (15K IOPS). Defaults to Standard
SizeVolume size from 1 GB to 100 GB
Volume Limitations

Attaching a volume limits your container to 1 replica and disables autoscaling. Redeployments cause brief downtime (10–30 seconds). See the Persistent Volumes guide for details.

Autoscaling​

Autoscaling configuration when creating a new container. Note: autoscaling is not available when a persistent volume is attached.

7. Environment Variables (Advanced)​

In advanced mode, the Environment & Files section lets you configure:

  • Environment Variables: Add key-value configuration
  • Files: Mount configuration files into the container
Example KeyExample Value
NODE_ENVproduction
DATABASE_URLpostgresql://...
API_KEYyour-secret-key
Secrets

For sensitive values, use the secret toggle to mask the value in the UI.

Post-Creation

Environment variables can also be managed after creation in the container's Environments tab.

8. Advanced Settings (Advanced)​

In advanced mode, the Advanced Settings section provides:

Health Checks​

Configure health checks for automatic restart on failure:

HTTP Health Check:

FieldDescription
PathEndpoint to check (e.g., /health)
PortPort to check
IntervalTime between checks (default: 30s)
TimeoutMax wait time (default: 5s)
ThresholdFailures before restart (default: 3)

TCP Health Check: For non-HTTP services, use TCP checks that verify the port is accepting connections.

Init Containers​

Configure initialization containers that run before the main container starts. Useful for database migrations, configuration setup, or dependency checks.

Security Context​

Configure security restrictions for your container. This is optional - SailOps provides strong container isolation by default.

FieldDescription
Run As User IDNumeric UID (e.g., 1000)
Run As Group IDNumeric GID (e.g., 1000)

9. Create the Container​

  1. Review your configuration
  2. Click Create
  3. The container is created in stopped state (0 replicas)
Start Manually

After creation, click Start on the container to begin deployment. This lets you review the configuration before consuming compute resources.

After Creation​

Verify Deployment​

  1. Check the container status changes to Healthy
  2. View the Logs tab for application output
  3. Check the Events tab for any issues

Access Your Container​

Containers are not publicly accessible by default. To expose them:

  1. Create a Gateway and add a route to your container
  2. Or use Quick Expose for instant public access via a shared gateway

Quick Expose​

For rapid testing, click the Quick Expose button on your container to automatically create a public URL via a shared gateway. This is ideal for development and demos.

Internal Access​

Other containers in the same project can access your container via internal DNS:

http://{service-name}.{namespace}:{port}

For example, if your container is named backend in namespace my-project-abc123:

http://backend.my-project-abc123:3000

The namespace is automatically assigned to your project. You can find it in the container details.

Example Configurations​

Node.js Application​

ParameterValue
Nameapi-server
Imagenode:20-alpine
Port3000
Compute ClassStandard
CPU2 cores
Memory8 GB (auto-calculated from 1:4 ratio)

Environment variables: NODE_ENV=production, PORT=3000

Health check: HTTP on /health:3000

Python Flask​

ParameterValue
Nameflask-app
Imagepython:3.12-slim
Port5000
Compute ClassEco
CPU1 core
Memory2 GB (auto-calculated from 1:2 ratio)

Environment variables: FLASK_ENV=production

Nginx Static Site​

ParameterValue
Namestatic-site
Imagenginx:alpine
Port80
Compute ClassEco
CPU0.5 cores
Memory1 GB (auto-calculated from 1:2 ratio)

Troubleshooting​

Image Pull Failed​

  • Verify the image name and tag are correct
  • For private registries, check registry configuration
  • Ensure the image exists and is accessible

Container Crashes​

  • Check Logs for error messages
  • Verify environment variables are set correctly
  • Ensure the application handles the PORT environment variable
  • Check resource limits aren't too restrictive

Port Issues​

  • Verify the container port matches your application
  • Check there are no port conflicts
  • Ensure the application binds to 0.0.0.0, not 127.0.0.1

Next Steps​