import-compose

$npx mdskill add kurtosis-tech/kurtosis/import-compose

Convert Docker Compose files to Kurtosis enclaves instantly.

  • Migrates existing Docker workflows to Kurtosis enclaves.
  • Requires kurtosis CLI with a running engine.
  • Executes services directly or generates Starlark code.
  • Supports images, ports, volumes, and environment variables.

SKILL.md

.github/skills/import-composeView on GitHub ↗
---
name: import-compose
description: Import Docker Compose files into Kurtosis. Convert docker-compose.yml to Starlark packages or run them directly. Use when migrating existing Docker Compose workflows to Kurtosis.
compatibility: Requires kurtosis CLI with a running engine.
metadata:
  author: ethpandaops
  version: "1.0"
---

# Import Compose

Import Docker Compose files into Kurtosis, either running them directly or converting to Starlark.

## Run a Docker Compose file

```bash
kurtosis import docker-compose.yml
```

This creates an enclave and runs all services defined in the Compose file.

## Run with a named enclave

```bash
kurtosis import -n my-enclave docker-compose.yml
```

## Convert only (don't run)

Generate Starlark code from a Compose file without executing:

```bash
kurtosis import -c docker-compose.yml
```

This outputs Starlark that you can save and customize.

## Custom .env file

```bash
kurtosis import -e ./custom.env docker-compose.yml
```

Default is `.env` in the current directory.

## Supported Compose features

Most common Compose features are supported:
- Services with images
- Port mappings
- Environment variables
- Volumes (converted to file artifacts)
- Depends-on (converted to service ordering)
- Networks (Kurtosis handles networking automatically)

## Limitations

- Build directives are not supported (images must be pre-built)
- Some advanced networking features may not translate directly
- Volume mounts become file artifacts (not persistent volumes)

More from kurtosis-tech/kurtosis

SkillDescription
cli-local-buildBuild and test the Kurtosis CLI from source. Compile the CLI binary locally, run it against Docker or Kubernetes engines, and iterate on CLI changes without creating a release. Use when developing or debugging CLI commands.
cluster-manageManage Kurtosis cluster settings. Switch between Docker and Kubernetes backends, list available clusters, and configure which cluster Kurtosis uses. Use when you need to change where Kurtosis runs enclaves.
context-manageManage Kurtosis contexts for connecting to different Kurtosis instances. Add, list, switch, and remove contexts. Use when working with multiple Kurtosis environments (local, remote, team shared).
docker-debugDebug Kurtosis running on local Docker. Inspect engine, API container, and service logs. Diagnose container crashes, port conflicts, and networking issues. Use when kurtosis commands fail or services aren't reachable on Docker.
docker-local-buildBuild and test Kurtosis from source on local Docker. Compiles all components (engine, core, files-artifacts-expander), builds Docker images, installs the CLI, and restarts the engine. Use when developing Kurtosis and testing changes locally with Docker.
dumpDump Kurtosis state for debugging and sharing. Export enclave state including service logs, configurations, and file artifacts to a local directory. Use when you need to capture state for offline analysis or to share with others for debugging.
enclave-inspectInspect and manage Kurtosis enclaves. List enclaves, view services and ports, examine file artifacts, dump enclave state for debugging, and clean up. Use when you need to understand what's running inside an enclave or export its state.
engine-manageManage the Kurtosis engine server. Start, stop, restart the engine, check status, and view engine logs. Covers both Docker and Kubernetes engine backends. Use when the engine won't start, needs restarting, or you need to check engine health.
files-inspectInspect, download, upload, and debug Kurtosis file artifacts. View artifacts in an enclave, download them locally for inspection, upload local files, and troubleshoot file mounting issues. Use when services can't find expected files or configs are wrong.
gatewayStart and manage the Kurtosis gateway for Kubernetes. The gateway forwards local ports to the Kurtosis engine and services running in a k8s cluster. Required when using Kurtosis with Kubernetes. Use when kurtosis engine status shows nothing on k8s or services aren't reachable.