Docker BuildKit on Morph Cloud
tl;dr Launch optimized Docker environments with BuildKit enabled on Morph Cloud. Create, branch, and restore Docker build environments within seconds using Morph Cloud's Infinibranch technology.
Prerequisites
Install the Morph Cloud SDK
To get started, install the Morph Python SDK:
uv pip install morphcloud
Set your API key
export MORPH_API_KEY='your-key-here'
You can generate an API key in the Morph Cloud console.
Quick Start
Launch optimized Docker environments with BuildKit enabled for faster, more efficient container builds. Perfect for CI/CD pipelines and development workflows.
📁 Complete Docker BuildKit Example
The example includes:
- Docker installation with BuildKit configuration
- Multi-stage Dockerfile with parallel builds
- Health check and web server setup
- Service exposure and URL management
- Snapshot creation for reusable environments
Getting Started
# Install dependencies
uv pip install morphcloud
# Set your API key
export MORPH_API_KEY='your-key-here'
# Clone and run the complete example
git clone https://github.com/morph-labs/morphcloud-examples-public.git
cd morphcloud-examples-public/docker-buildkit
python docker-buildkit_setup.py
Once setup is complete, you can launch new instances instantly from the created snapshot for parallel build testing and isolated Docker environments.