Sign inSign up

sakiladb/clickhouse

By sakiladb

•Updated 3 months ago

ClickHouse docker image preloaded with Sakila example database

Image
Developer tools
Databases & storage
0

905

sakiladb/clickhouse repository overview

⁠sakiladb/clickhouse

A ClickHouse Docker image preloaded with the Sakila⁠ sample database (ported from the MySQL Sakila via jOOQ⁠). One of the sakiladb⁠ image family.

These images exist primarily as test fixtures for sq⁠, a command-line tool for querying SQL databases and structured data — but they are free for anyone to use.

Available on Docker Hub⁠ and GitHub Container Registry⁠.

⁠Quick start

docker run -p 8123:8123 -p 9000:9000 -d sakiladb/clickhouse:latest

The image declares a Docker HEALTHCHECK⁠, so you can wait for readiness rather than guessing. Its status becomes healthy once ClickHouse is serving:

docker run -p 8123:8123 -p 9000:9000 -d --name sakila sakiladb/clickhouse:latest
until [ "$(docker inspect -f '{{.State.Health.Status}}' sakila)" = healthy ]; do sleep 1; done

Tip

Building or testing on GitHub Actions? Pull from GHCR (`ghcr.io/sakiladb/clickhouse`). Docker Hub rate-limits pulls and CI runners share IP addresses, so the limit is reached quickly; GHCR isn't throttled the same way, especially from within GitHub's network.

⁠Connection

SettingValue
hostlocalhost
HTTP port8123
native port9000
databasesakila
usersakila
passwordp_ssW0rd
$ clickhouse-client -u sakila --password p_ssW0rd -d sakila -q 'SELECT actor_id, first_name, last_name FROM actor LIMIT 5'

⁠What's inside

The standard Sakila sample database — 16 tables and 7 views, all owned by the sakila user, the same object set as every other sakiladb variant.

Tables (16)Views (7)
actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, storeactor_info, customer_list, film_list, nicer_but_slower_film_list, sales_by_film_category, sales_by_store, staff_list

film_text is a populated table with working full-text search, added as a stable tokenbf_v1 data-skipping index under the table (so the column set stays identical to every other variant):

SELECT title FROM sakila.film_text
WHERE hasToken(lowerUTF8(concat(title, ' ', description)), 'astronaut');

⁠Differences from other sakila variants

Every sakiladb variant exposes the same Sakila fixture — the same 16 tables and 7 views, with the same data — so sq⁠ can assert a uniform schema across all of them. ClickHouse representation details:

  • Columnar engine. Tables are MergeTree; ClickHouse does not enforce foreign keys and has no stored procedures, functions, or triggers (relationships are documented in schema comments). This is inherent to the engine and invisible to the uniform schema.
  • Full-text search uses hasToken(...) (accelerated by the tokenbf_v1 index), the ClickHouse analogue of postgres @@ / MySQL MATCH … AGAINST.
  • film.special_features is an Array(String).
  • staff.picture is omitted (a permanent ClickHouse exception). It is Sakila's only binary (BLOB) column, and ClickHouse has no dedicated binary type: its String type holds arbitrary bytes and deliberately stands in for BLOB / VARCHAR / CLOB / TEXT, so a column cannot be marked as binary rather than text. The bytes would store fine, but the column would inspect as text (sq reads String back as kind.Text, never kind.Bytes), so it is dropped rather than misrepresented as a string column. This is a by-design trait of ClickHouse, not a temporary gap or a pending upstream fix (the String-is-binary model is intentional), so unlike the other engines ClickHouse keeps this column omitted indefinitely. Engines with a real binary type (Postgres bytea, SQL Server varbinary, Oracle BLOB, SQLite / MySQL BLOB) keep the column, leaving ClickHouse the only sakiladb variant without it.

⁠Available versions

latest tracks the newest ClickHouse version.

ClickHousesakiladb ReleaseArchitectureDocker HubGitHub Container Registry
25v25.0.3amd64, arm64sakiladb/clickhouse:25⁠, :latest⁠ghcr.io/sakiladb/clickhouse:25⁠, :latest⁠

Every version is published to both Docker Hub⁠ and GitHub Container Registry⁠, is multi-arch (linux/amd64, linux/arm64), and is signed with cosign⁠.

⁠Releasing a new version

Maintainers: releases are tag-driven. Pushing a semver tag vN.0.x builds and publishes the image — the version is derived from the tag. See CLAUDE.md⁠ for the full procedure.

⁠Changelog

⁠2026-06-28
  • Maintenance release (v25.0.3): CI and supply-chain hardening (release-gated registry login, SHA-pinned third-party actions, Dependabot for GitHub Actions). The Sakila dataset and schema are unchanged from the previous release.
⁠2026-06-26
  • Restored faithful original data (v25.0.2). The Sakila data is now byte-identical to the original MySQL Sakila: the Unicode accents stripped from international place names (e.g. Réunion, Coruña) are restored.
  • Reconciled to the consistent sakiladb fixture: 16 tables + 7 views. Added film_text (populated, with a tokenbf_v1 full-text index — hasToken('astronaut') = 78) and the actor_info (two-stage GROUP BY rewrite) and nicer_but_slower_film_list views; made film_list's cast order deterministic (arraySort); customer.active / staff.active are now Bool. Output is byte-identical to the other variants.
  • Added a Docker HEALTHCHECK (clickhouse-client … SELECT 1).

⁠License

BSD 2-Clause⁠.

Tag summary

Content type

Image

Digest

sha256:f12bac39b…

Size

219.7 MB

Last updated

3 months ago

docker pull sakiladb/clickhouse