Skip to main content
Version: Next

Managed Containers

Part of Runtimes

This is a detailed guide for Managed Containers. For an overview of all runtime types and how to choose between them, see Runtimes Overview. To understand the differences between Reactives and Managed Containers, also see Codesphere Reactives.

Managed Containers allow you to bring your own OCI images to Codesphere while leveraging the platform's orchestration, networking, and monitoring capabilities. This runtime type uses the same underlying infrastructure as Codesphere Reactives, but allows you to define custom images and pre-bake dependencies via OCI images.

Overview

Managed Containers bridge the gap between the simplicity of Codesphere Reactives and the flexibility of custom container images:

FeatureCodesphere ReactivesManaged Containers
Base ImageShared Codesphere Ubuntu (customizable for private cloud)Your own OCI image
Startup TimeMillisecondsSeconds (depends on image size)
DependenciesLocal (npm packages, Python packages, etc.) or NixPre-baked in OCI image
OS DistributionUbuntu or set by organization adminAny (Alpine, Debian, etc.)
Image RegistryN/ADocker Hub, ECR, private registries
OrchestrationFull platform featuresFull platform features
Filesystem AccessCustomizable shared network filesystemCustomizable shared network filesystem
Off-when-unusedYesYes
Scaling & Load BalancingYesYes
Platform IntegrationBuilt-inAt runtime

Architecture

Managed Containers use the same orchestration platform as Reactives, with the key difference being the container image source:

Key Components

1. Custom Container Image

  • Define your own base image via Dockerfile
  • Pull from Docker Hub, ECR, GCR, or private registries
  • Pre-bake all system dependencies and packages
  • Complete control over OS distribution and version

2. Platform Orchestration

  • Same Kubernetes-based orchestration as Reactives
  • Health monitoring, load balancing, and auto-scaling
  • Off-when-unused capabilities for resource efficiency
  • Codesphere agent integrated at runtime for platform features

3. Shared Network Filesystem

  • Identical filesystem access as Reactives
  • Mount any file or directory to any destination in your container
  • Default mount at /home/user/app for persistent storage
  • Same best practices apply (write to app directory, avoid concurrent writes)

4. Image Pull & Startup

  • Container images pulled from registry on first start
  • Subsequent starts may use cached images (depends on cluster state)
  • Startup time typically in seconds vs milliseconds for Reactives
  • Trade-off for complete image customization

When to Use Managed Containers

Managed Containers are ideal for:

  • Existing OCI Images/Dockerfiles - Reuse existing container definitions
  • Specific base OS requirements - Alpine, Debian, custom distributions
  • Complex dependencies - System-level packages best managed via Dockerfile
  • Open source projects - Already containerized applications
  • Registry-based workflows - CI/CD that pushes images to registries

Consider Codesphere Reactives instead when:

  • You don't need a specific base image
  • Faster startup time is critical
  • You prefer runtime dependency installation via Nix
  • You're starting a new greenfield project

Commonalities with Codesphere Reactives

Both runtime types share the same underlying platform capabilities:

CapabilityBoth Runtimes
Filesystem AccessShared network filesystem at /home/user/app
Off-when-unusedAutomatic resource deallocation during idle periods
ScalingHorizontal (replicas) and vertical (plans)
Load BalancingAutomatic via Landscape Router
Health MonitoringConfigurable health checks and auto-restart
Private NetworkingSecure internal service communication
Secret ManagementVault integration for sensitive data
MonitoringLogs, metrics, and request tracing
Platform IntegrationCodesphere agent for platform features

Configuration & Lifecycle

Managed Containers are configured through the ci.yml file in your repository. For comprehensive guides on configuring and managing Managed Containers, see: