# Dolt Integration with Other Tools: Docker, SQL Server, and CI/CD Pipelines

> Integrate Dolt with Docker, SQL Server, and CI/CD using its MySQL-compatible SQL server and Git-style data versioning. Keep your existing infrastructure intact.

- Repository: [DoltHub/dolt](https://github.com/dolthub/dolt)
- Tags: how-to-guide
- Published: 2026-03-14

---

**Dolt integrates with existing data toolchains through official Docker images, a MySQL-compatible SQL server, and repository-native CI/CD workflows, enabling Git-style data versioning without replacing your current infrastructure.**

Dolt is a version-controlled SQL database that combines Git semantics with MySQL compatibility. Whether you are deploying containerized microservices or managing analytical pipelines, understanding how Dolt integration with other tools works allows you to leverage branch and merge semantics for your data while maintaining drop-in compatibility with existing ORMs, BI platforms, and orchestration systems.

## Docker-Based Integration for Containerized Workflows

The Dolt repository ships production-ready container images that support both interactive CLI usage and server deployment. These images enable seamless integration with Kubernetes, Docker Compose, and CI/CD runners.

### CLI Container Image

The `dolthub/dolt` image packages the Dolt binary for command-line operations. Defined in the repository's [`docker/README.md`](https://github.com/dolthub/dolt/blob/main/docker/README.md) and associated Dockerfile, this image is ideal for running version-controlled data tasks in automated pipelines.

```bash
docker run --rm dolthub/dolt:latest version

```

This lightweight container exposes the full `dolt` CLI, allowing you to execute commands like `dolt clone`, `dolt sql`, and `dolt commit` within ephemeral CI environments without installing dependencies on the host runner.

### SQL Server Container Image

For production workloads, the `dolthub/dolt-sql-server` image provides a MySQL-compatible server. The multi-stage build defined in `docker/serverDockerfile` compiles the Dolt binary and packages it with runtime dependencies (`bzip2`, `gzip`, `xz-utils`), using `tini` as the init system to manage the server process.

```bash
docker run -d --name dolt-db -p 3306:3306 dolthub/dolt-sql-server:latest

```

The entrypoint launches `dolt sql-server`, exposing port 3306 for standard MySQL wire protocol connections. This allows you to substitute Dolt for MySQL in existing [`docker-compose.yml`](https://github.com/dolthub/dolt/blob/main/docker-compose.yml) files with zero application code changes.

## MySQL-Compatible SQL Server Mode

At the core of Dolt's external tool integration is the `dolt sql-server` command, implemented in [`go/cmd/dolt/commands/sqlserver/sqlserver.go`](https://github.com/dolthub/dolt/blob/main/go/cmd/dolt/commands/sqlserver/sqlserver.go). This mode transforms Dolt from a CLI tool into a fully operational SQL database server.

### Wire-Compatible Protocol Support

When running `dolt sql-server`, Dolt exposes a MySQL-compatible endpoint that accepts connections from any standard client. According to the source code in [`sqlserver.go`](https://github.com/dolthub/dolt/blob/main/sqlserver.go), authentication is handled through the `.dolt/sql-server.info` file rather than command-line flags, streamlining credential management for containerized deployments.

```bash
mysql --host 127.0.0.1 --port 3306 -uroot -p'' -e "SHOW DATABASES;"

```

Once connected, clients can execute standard SQL while also invoking Dolt-specific stored procedures such as `CALL dolt_init()` and `CALL dolt_commit('-m', 'message')`, enabling version control operations through familiar database drivers.

### Advanced Server Configuration

The server supports granular configuration via YAML files passed with the `--config` flag. As implemented in the source, you can configure TLS encryption, read-only mode, and performance tuning parameters. The server also registers the system variable `@@dolt_transaction_commit`, allowing applications to control whether Dolt automatically creates commits on transaction boundaries.

### Replication and RemotesAPI Support

Dolt supports MySQL binlog replication through the RemotesAPI. By starting the server with `--remotesapi-port 8080` (defined at line 213 of [`sqlserver.go`](https://github.com/dolthub/dolt/blob/main/sqlserver.go)), you enable an HTTP-based replication endpoint that standard MySQL instances can target as a master.

```bash
dolt sql-server --remotesapi-port 8080

```

This feature, tested in [`libraries/doltcore/sqle/binlogreplication/binlog_replication_test.go`](https://github.com/dolthub/dolt/blob/main/libraries/doltcore/sqle/binlogreplication/binlog_replication_test.go), allows Dolt to function as either a replication source or destination within existing MySQL replication topologies.

## Version-Controlled CI/CD Integration

Dolt ships with a built-in CI framework that stores pipeline definitions inside the database repository itself, versioning your test logic alongside your data schema and content.

### Initializing CI Infrastructure

The `dolt ci init` command, implemented in [`go/cmd/dolt/commands/ci/init.go`](https://github.com/dolthub/dolt/blob/main/go/cmd/dolt/commands/ci/init.go), bootstraps the CI system by creating `dolt_ci_*` system tables and making an initial commit. This stores your continuous integration configuration within the Dolt repository, making it branch-aware and auditable through `dolt log`.

### Workflow Management and Execution

CI workflows are defined in YAML and imported using `dolt ci import`, parsed by the logic in [`go/cmd/dolt/commands/ci/import.go`](https://github.com/dolthub/dolt/blob/main/go/cmd/dolt/commands/ci/import.go). The import process validates the workflow structure via `parseWorkflowConfig` and `validateImportArgs` before persisting definitions to the `dolt_ci_workflows` table.

```yaml

# my-workflow.yaml

name: nightly-tests
on:
  push:
    branches: [ "main" ]
jobs:
  - name: run-unit-tests
    steps:
      - name: unit-test-step
        saved_query_name: dolt_ci_test
        expected_rows: 0

```

```bash
dolt ci import my-workflow.yaml
dolt sql -q "SELECT * FROM dolt_ci_workflows;"

```

The `dolt ci run` command (from [`go/cmd/dolt/commands/ci/run.go`](https://github.com/dolthub/dolt/blob/main/go/cmd/dolt/commands/ci/run.go)) executes these stored workflows, enabling automated testing that respects Dolt's branch and merge semantics.

## ORM and Database Client Compatibility

To guarantee interoperability, Dolt maintains comprehensive integration tests against popular database abstraction layers and MySQL client libraries.

### Automated ORM Testing Matrix

The Dockerfile at `integration-tests/orm-tests/Dockerfile` builds a test environment that validates Dolt against TypeORM, Prisma, Mikro-ORM, and Hibernate. The [`orm-tests-entrypoint.sh`](https://github.com/dolthub/dolt/blob/main/orm-tests-entrypoint.sh) script orchestrates the test sequence by starting `dolt sql-server`, waiting for readiness, and executing each ORM's test suite.

```bash
docker build -t orm-tests -f integration-tests/orm-tests/Dockerfile .
docker run --rm orm-tests:latest

```

This ensures that Object-Relational Mapping tools generate compatible SQL and that connection pooling, transaction management, and schema migrations function correctly.

### Protocol Compliance Testing

The Bats test suite in `integration-tests/bats/sql-server.bats` exercises low-level MySQL protocol behaviors, authentication edge cases, and replication scenarios. These tests run automatically via [`integration-tests/go-sql-server-driver/main_test.go`](https://github.com/dolthub/dolt/blob/main/integration-tests/go-sql-server-driver/main_test.go) and the CI workflow defined in [`.github/workflows/ci-sql-server-integration-tests.yaml`](https://github.com/dolthub/dolt/blob/main/.github/workflows/ci-sql-server-integration-tests.yaml), providing continuous validation that Dolt remains a drop-in MySQL replacement.

## Summary

- **Docker Integration**: Use `dolthub/dolt` for CLI operations and `dolthub/dolt-sql-server` for MySQL-compatible server deployments, both defined in `docker/serverDockerfile` and related build files.
- **SQL Server Mode**: The `dolt sql-server` command in [`go/cmd/dolt/commands/sqlserver/sqlserver.go`](https://github.com/dolthub/dolt/blob/main/go/cmd/dolt/commands/sqlserver/sqlserver.go) provides wire-protocol compatibility, supporting standard MySQL clients, ORMs, and replication through the RemotesAPI.
- **CI/CD Workflows**: The `dolt ci` subcommands (`init`, `import`, `run`) enable version-controlled continuous integration, storing workflow definitions in `dolt_ci_workflows` tables that track changes through Dolt's native versioning.
- **Compatibility Assurance**: Automated testing via `integration-tests/orm-tests/Dockerfile` and `integration-tests/bats/sql-server.bats` validates compatibility with TypeORM, Prisma, Hibernate, and standard MySQL protocol implementations.

## Frequently Asked Questions

### Can Dolt replace MySQL in existing Docker Compose setups?

Yes. The `dolthub/dolt-sql-server` image exposes the standard MySQL port (3306) and wire protocol. You can replace MySQL service definitions in [`docker-compose.yml`](https://github.com/dolthub/dolt/blob/main/docker-compose.yml) files with Dolt, and existing applications using standard MySQL drivers will connect without configuration changes. The entrypoint defined in `docker/serverDockerfile` handles server initialization and signal management via `tini`.

### How does Dolt handle authentication for SQL Server connections?

Dolt stores authentication credentials in the `.dolt/sql-server.info` file rather than accepting user/password flags at startup. This approach, verified in [`sqlserver_info_test.go`](https://github.com/dolthub/dolt/blob/main/sqlserver_info_test.go), allows you to mount secrets as files in containerized environments while keeping connection strings compatible with standard MySQL clients that expect username and password parameters.

### What ORMs are officially tested against Dolt?

According to `integration-tests/orm-tests/Dockerfile`, Dolt maintains compatibility tests for TypeORM, Prisma, Mikro-ORM, and Hibernate. The test entrypoint script validates that these ORMs can connect, execute migrations, perform CRUD operations, and manage transactions against a live `dolt sql-server` instance, ensuring production readiness for Node.js, Java, and TypeScript applications.

### Can I version control CI/CD pipelines within Dolt itself?

Yes. The `dolt ci` command suite enables you to store workflow definitions in YAML format, import them into system tables via `dolt ci import`, and execute them with `dolt ci run`. Because these workflows live in `dolt_ci_workflows` tables, they are subject to Dolt's versioning semantics—meaning changes to your test logic are tracked in commit history, reviewable via `dolt diff`, and branched alongside your data.