Nov 18, 20267 min read

Docker Compose Alternatives for Local Development

When a docker-compose.yml for local Postgres, Redis and queues stops matching production, these are the alternatives: Tilt, Skaffold, Dev Containers, Testcontainers, Podman Compose, and infrastructure that the application declares itself.

Illustration for Docker Compose Alternatives for Local Development

Docker Compose is how most backend teams run Postgres, Redis and a queue next to their code: one docker-compose.yml, docker compose up, and a new hire has the stack running in a few minutes. It stops being enough when the file has forty lines of environment variables that someone keeps in sync with Terraform by hand, when the Redis image locally is three versions behind ElastiCache, or when the queue in the compose file is RabbitMQ and production uses SQS with different retry behaviour.

The alternatives fix different parts of that. Some bring Kubernetes parity, some isolate tests, some standardize the whole dev environment, and one removes the separate description of local infrastructure altogether. This guide compares them on what they replace, how close they get to production, and what they ask of the team.

Docker Compose Alternatives at a Glance

EncoreTiltSkaffoldDev ContainersTestcontainersPodman Compose
ReplacesThe infrastructure half of the compose fileCompose for Kubernetes appsCompose for Kubernetes appsThe dev machine setupCompose in testsThe Docker engine
ConfigInfrastructure declared in TypeScript or GoTiltfile (Starlark)skaffold.yamldevcontainer.jsonCode in your test suiteThe same compose file
Production paritySame declarations provision AWS or GCP resourcesSame Kubernetes manifestsSame Kubernetes manifestsToolchain onlySame images per testSame as Compose
Live reloadencore run watches and rebuildsLive update into running containersFile sync and rebuildEditor inside the containerNot applicableSame as Compose
Best forGo and TypeScript backends on AWS or GCPMulti-service apps on KubernetesKubernetes apps, CI parityConsistent environments across a teamIntegration testsDocker-free hosts

1. Encore

Encore

Encore brings infrastructure from code to Go and TypeScript backends, which makes most of a compose file unnecessary: the database, topics, caches and buckets are declared in the code that uses them, encore run starts them locally with the services, and the same declarations become RDS, SNS with SQS, and ElastiCache in your AWS account, or the GCP equivalents. Local and production come from one source, as the infrastructure docs describe.

Set up the app

Install the Encore CLI with the command for your system, then create the app:

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

~
$ encore app create signups --example=hello-world$ cd signups && mkdir -p users/migrations

A compose file for this service would list postgres:17, redis:7 and a queue broker, with ports and connection strings. Here the migration creates a users table with id BIGSERIAL, email TEXT UNIQUE and created_at, and the rest is Go:

// users/users.go package users import ( "context" "errors" "strings" "time" "encore.dev/beta/errs" "encore.dev/pubsub" "encore.dev/rlog" "encore.dev/storage/cache" "encore.dev/storage/sqldb" ) // Replaces the postgres service in docker-compose.yml. var db = sqldb.NewDatabase("users", sqldb.DatabaseConfig{Migrations: "./migrations"}) // Replaces the redis service. var cluster = cache.NewCluster("signups", cache.ClusterConfig{EvictionPolicy: cache.AllKeysLRU}) var attemptsByDomain = cache.NewIntKeyspace[string](cluster, cache.KeyspaceConfig{ KeyPattern: "signup-attempts/:key", DefaultExpiry: cache.ExpireIn(time.Hour), }) type SignedUp struct { UserID int64 Email string } // Replaces the queue broker. var Signups = pubsub.NewTopic[*SignedUp]("signups", pubsub.TopicConfig{ DeliveryGuarantee: pubsub.AtLeastOnce, }) type SignupParams struct { Email string `json:"email"` } //encore:api public method=POST path=/signup func Signup(ctx context.Context, p *SignupParams) error { email := strings.ToLower(strings.TrimSpace(p.Email)) at := strings.LastIndex(email, "@") if at < 1 { return &errs.Error{Code: errs.InvalidArgument, Message: "invalid email"} } if n, err := attemptsByDomain.Increment(ctx, email[at+1:], 1); err == nil && n > 50 { return &errs.Error{Code: errs.ResourceExhausted, Message: "too many signups from this domain"} } var id int64 if err := db.QueryRow(ctx, ` INSERT INTO users (email) VALUES ($1) ON CONFLICT (email) DO NOTHING RETURNING id`, email).Scan(&id); err != nil { if errors.Is(err, sqldb.ErrNoRows) { return nil // already signed up } return err } _, err := Signups.Publish(ctx, &SignedUp{UserID: id, Email: email}) return err } var _ = pubsub.NewSubscription(Signups, "welcome-email", pubsub.SubscriptionConfig[*SignedUp]{ Handler: func(ctx context.Context, e *SignedUp) error { rlog.Info("send welcome email", "to", e.Email) return nil }, })
~/signups
$ encore run$ curl -X POST localhost:4000/signup -d '{"email":"ada@acme.dev"}'

encore run starts Postgres, applies the migration, runs an in-memory Redis and Pub/Sub, and starts the service, with no YAML, ports or connection strings to keep in sync. The local development dashboard shows traces of each request, including the database query and the published message. On deploy, Encore provisions RDS, ElastiCache and SNS with SQS in your AWS account, and Encore provisions an IAM role for the service. With the infrastructure in the code, a coding agent that adds a cache keyspace or a topic changes one file and runs the whole stack with one command, instead of editing a compose file and a Terraform module separately.

Encore covers the backend's infrastructure. A service that depends on something Encore does not provide, such as Elasticsearch, still has to run that dependency some other way, and Compose can stay for that.

The database, Pub/Sub and caching docs cover each declaration used here in more detail.

Best fit: Go and TypeScript backends on AWS or GCP whose compose file mostly exists to run Postgres, Redis and a queue.

2. Tilt

Tilt runs a multi-service app on a local or remote Kubernetes cluster from a Tiltfile written in Starlark, rebuilds images on change, and can live-update files into running containers without a full rebuild. Its web UI shows each service's logs and status. Tilt can also drive Docker Compose files, so teams can adopt it gradually.

It is strongest when production is Kubernetes and you want the same manifests locally, and it brings a local cluster and Kubernetes knowledge as requirements.

Best fit: teams with many services on Kubernetes who want fast inner loops with production manifests.

3. Skaffold

Skaffold from Google handles build, push and deploy for Kubernetes apps, with skaffold dev watching files and redeploying, and the same skaffold.yaml usable in CI. It integrates with Helm and Kustomize and supports file sync for interpreted languages.

Like Tilt, it assumes Kubernetes, and it has a lighter UI and a more CI-oriented design.

Best fit: Kubernetes teams that want one config for local development and CI.

4. Dev Containers

The Dev Containers specification describes a full development environment in devcontainer.json, including the toolchain, editor extensions and supporting services, which VS Code, JetBrains IDEs and GitHub Codespaces can open. It can reference a compose file for databases.

It standardizes the machine more than the infrastructure, so it pairs with Compose or another tool rather than replacing it, and it does nothing for production parity of the services themselves.

Best fit: teams that want every developer, and Codespaces, on an identical toolchain.

5. Testcontainers

Testcontainers starts containers from inside your test suite, in Java, Go, Node.js, Python and other languages, so each test run gets a fresh Postgres or Kafka and tears it down afterward. It replaces the "run docker compose up before the tests" step and the shared state that comes with it.

It is a testing tool, so day-to-day development usually keeps another way to run the stack.

Best fit: integration tests that need real dependencies and isolation per run.

6. Podman Compose

Podman runs containers without a daemon and without root, and podman compose runs existing compose files against it. Teams move to it for licensing, security or Linux-native reasons.

It keeps the Compose model and its drift from production exactly as it was.

Best fit: teams that like Compose and want a different container engine.

How to Choose

Keep Docker Compose when a handful of services run fine and drift has not bitten you. Pick Tilt or Skaffold when production is Kubernetes. Pick Dev Containers to standardize toolchains, and Testcontainers to isolate tests. Pick Encore when the compose file mostly exists to run your backend's Postgres, cache and queues, and you want those declared once in code for local and production.

Frequently asked questions

What is the best alternative to Docker Compose for local development?

Pick by the problem you have with Compose. Tilt and Skaffold suit teams that deploy to Kubernetes and want the same manifests locally. Dev Containers standardize the editor and toolchain. Testcontainers gives each test its own database. Tools that start infrastructure from the application code remove the compose file for the backend's own dependencies.

Why does Docker Compose drift from production?

The compose file describes local containers, while production is described separately in Terraform, Helm or a PaaS config. Versions, queue semantics, environment variable names and IAM behaviour change in one place and not the other, so code that works against the compose stack can fail after deploy.

Is Podman Compose a drop-in replacement for Docker Compose?

Yes. For most files, podman compose runs a Compose provider such as docker-compose or podman-compose against Podman, and the same YAML works. It changes the container engine, not the model, so the drift between the compose file and production remains.

How do I run Postgres and a message queue locally without a docker-compose.yml?

With Encore, declare the database with sqldb.NewDatabase and the topic with pubsub.NewTopic in Go, or SQLDatabase and Topic in TypeScript. encore run starts Postgres and an in-process Pub/Sub, applies migrations and runs the services, and the same declarations become RDS and SNS with SQS on AWS, or Cloud SQL and Pub/Sub on GCP.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders