ClickHouse docker image preloaded with Sakila example database
905
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.
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.
| Setting | Value |
|---|---|
| host | localhost |
| HTTP port | 8123 |
| native port | 9000 |
| database | sakila |
| user | sakila |
| password | p_ssW0rd |
$ clickhouse-client -u sakila --password p_ssW0rd -d sakila -q 'SELECT actor_id, first_name, last_name FROM actor LIMIT 5'
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, store | actor_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');
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:
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.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.latest tracks the newest ClickHouse version.
| ClickHouse | sakiladb Release | Architecture | Docker Hub | GitHub Container Registry |
|---|---|---|---|---|
| 25 | v25.0.3 | amd64, arm64 | sakiladb/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.
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.
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.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.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.HEALTHCHECK (clickhouse-client … SELECT 1).Content type
Image
Digest
sha256:f12bac39b…
Size
219.7 MB
Last updated
3 months ago
docker pull sakiladb/clickhouse