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
- Select your project from the project switcher
- Click Containers in the left sidebar
- 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
Use lowercase letters, numbers, and hyphens. Start with a letter.
Docker Image
Specify the Docker image to deploy:
| Format | Example |
|---|---|
| Docker Hub | nginx:latest |
| Docker Hub (official) | library/nginx:1.25 |
| GitHub Registry | ghcr.io/org/image:tag |
| GitLab Registry | registry.gitlab.com/org/repo:tag |
| Custom Registry | registry.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:
| Class | CPU:RAM Ratio | Max Resources | Best For |
|---|---|---|---|
| Eco | 1:2 | 3 cores, 6 GB | Development, testing, budget-conscious workloads |
| Standard | 1:4 | 15 cores, 58 GB | General production workloads |
| Production | 1:4 | 6 cores, 28 GB | Sensitive workloads requiring dedicated resources |
| Prod. Compute | 1:2 | 6 cores, 16 GB | CPU-intensive tasks (data processing, APIs) |
| Prod. Memory | 1:8 | 6 cores, 58 GB | Memory-intensive tasks (caching, ML inference) |
| ARM | 1:4 | 8 cores, 32 GB | Cost-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
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:
| Field | Description |
|---|---|
| Container Port | The port your application listens on |
| Protocol | TCP 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.
- Select a service (PostgreSQL, MariaDB, Valkey, NATS, etc.)
- The connection details are automatically configured
- Environment variables are injected at startup
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:
| Field | Description |
|---|---|
| Mount Path | Absolute path inside the container (e.g., /data) |
| Storage Class | Standard (5K IOPS) or Performance (15K IOPS). Defaults to Standard |
| Size | Volume size from 1 GB to 100 GB |
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 Key | Example Value |
|---|---|
NODE_ENV | production |
DATABASE_URL | postgresql://... |
API_KEY | your-secret-key |
For sensitive values, use the secret toggle to mask the value in the UI.
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:
| Field | Description |
|---|---|
| Path | Endpoint to check (e.g., /health) |
| Port | Port to check |
| Interval | Time between checks (default: 30s) |
| Timeout | Max wait time (default: 5s) |
| Threshold | Failures 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.
| Field | Description |
|---|---|
| Run As User ID | Numeric UID (e.g., 1000) |
| Run As Group ID | Numeric GID (e.g., 1000) |
9. Create the Container
- Review your configuration
- Click Create
- The container is created in stopped state (0 replicas)
After creation, click Start on the container to begin deployment. This lets you review the configuration before consuming compute resources.
After Creation
Verify Deployment
- Check the container status changes to Healthy
- View the Logs tab for application output
- Check the Events tab for any issues
Access Your Container
Containers are not publicly accessible by default. To expose them:
- Create a Gateway and add a route to your container
- 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
| Parameter | Value |
|---|---|
| Name | api-server |
| Image | node:20-alpine |
| Port | 3000 |
| Compute Class | Standard |
| CPU | 2 cores |
| Memory | 8 GB (auto-calculated from 1:4 ratio) |
Environment variables: NODE_ENV=production, PORT=3000
Health check: HTTP on /health:3000
Python Flask
| Parameter | Value |
|---|---|
| Name | flask-app |
| Image | python:3.12-slim |
| Port | 5000 |
| Compute Class | Eco |
| CPU | 1 core |
| Memory | 2 GB (auto-calculated from 1:2 ratio) |
Environment variables: FLASK_ENV=production
Nginx Static Site
| Parameter | Value |
|---|---|
| Name | static-site |
| Image | nginx:alpine |
| Port | 80 |
| Compute Class | Eco |
| CPU | 0.5 cores |
| Memory | 1 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, not127.0.0.1