Skip to content

Fix broken build, replace the unmaintained Sakila image, add Codespaces - #1

Open
jvanbuel wants to merge 1 commit into
mainfrom
fix/modernize-stack
Open

Fix broken build, replace the unmaintained Sakila image, add Codespaces#1
jvanbuel wants to merge 1 commit into
mainfrom
fix/modernize-stack

Conversation

@jvanbuel

@jvanbuel jvanbuel commented Aug 11, 2026

Copy link
Copy Markdown

The repo does not build

docker compose build, the first command in the README, fails:

E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.

python:3.10-slim-buster is EOL and its apt repositories now return 404. The apt-get layer that fails installs no packages at all (--no-install-recommends with an empty package list), so this removes it rather than repairing it.

This matters more than the commit count suggests: dbt-docker draws 321 views over the last four months, roughly half of all traffic across the org's 40 public repos, and it is the only repo pulling meaningful cold discovery traffic. Everyone arriving has been landing on a broken first command.

Changes

File Change
Dockerfile python:3.12-slim; dbt-postgres 1.3.11.11.0 (dbt-core 1.12); dead apt layer and pytz pin removed
docker-compose.yml frantiseks/postgres-sakila → official postgres:17 + Pagila; TCP healthcheck; obsolete version: key dropped
snapshots/int_customers_per_store_snapshot.sql Renamed snapshot block, see below
packages.yml dbt_utils 1.0.01.4.1
README.md docker compose, corrected snapshot name, container names instead of docker ps lookup
db/ Pagila pagila-v3.1.0 vendored, 2.9 MB

Replacing the Sakila image

frantiseks/postgres-sakila is unmaintained and amd64-only, so every Apple Silicon user ran it under emulation. This switches to the official postgres:18 image preloaded with Pagila, the maintained Postgres port of Sakila.

Nothing is vendored. Dockerfile.postgres fetches the SQL at build time with ADD, so the repository keeps a URL instead of 13 MB of generated SQL, and changing dataset is a one-line edit to PAGILA_TAG. Files added from a URL are not world-readable by default, hence --chmod=644: the entrypoint reads them as the postgres user.

Pinned to pagila-v4.0.0, released 2026-07-28. The latest tag, v4.1.0, adds columns requiring the pgvector extension, which the official Postgres image does not carry. v4.0.0 needs no extensions at all, only PostgreSQL 18 for uuidv7().

Upstream health: 1099 stars, last push 5 days ago, 18 commits in 2026, 3 open issues, maintained since 2015 by Devrim Gunduz, who packages PostgreSQL for the Red Hat family. Single-maintainer, which is normal for a sample database.

A test that never ran

The snapshot block was named int_stock_balances_daily_grouped_by_day_snapshot while the file and _snapshots.yml both declared int_customers_per_store_snapshot. dbt warned that it could not find the node, so that snapshot's not_null test never executed. Renaming to match takes the suite from 8 data tests to 9. The wrong name appeared in the README example queries too.

Healthcheck

The healthcheck now runs over TCP. While the seed files load, the Postgres entrypoint runs a temporary server bound to the unix socket only, so a socket check reports healthy while TCP connections are still refused and dbt fails to connect on startup.

Codespaces

Adds .devcontainer/devcontainer.json and the badge, following the pattern already used by skill-boost-exposing-apis: docker-in-docker plus docker compose up -d --build on create, so the models are built by the time the editor opens. Postgres is forwarded on 5430. The three VS Code extension IDs were checked against the marketplace.

Verification

The postgres service builds from scratch and dbt build against it: PASS=15, WARN=0, ERROR=0. All six README example queries return sensible rows (51,061 payments, 599 seeded customers, 1,619 revenue dates).

One gap: the Docker image build itself is unverified. Docker Hub was unreachable from the machine this was prepared on, so python:3.12-slim never pulled. The dbt half was tested by running dbt-postgres 1.11 directly against the container, which covers the real risk in an 8-version jump. The deprecations expected around tests: and invalidate_hard_deletes turned out clean. Please confirm with one docker compose up --build before merging.

@jvanbuel
jvanbuel force-pushed the fix/modernize-stack branch 2 times, most recently from 22292bf to 3a850ce Compare August 11, 2026 12:35
@jvanbuel jvanbuel changed the title Fix broken build and replace the unmaintained Sakila image Fix broken build, replace the unmaintained Sakila image, add Codespaces Aug 11, 2026
@jvanbuel
jvanbuel force-pushed the fix/modernize-stack branch from 3a850ce to 58be010 Compare August 11, 2026 12:40
The image failed to build at the first README command. python:3.10-slim-buster
is EOL and its apt repositories now 404, so 'docker compose build' died on the
apt-get step. That step installed no packages at all, so it is removed rather
than repaired.

- Dockerfile: python:3.12-slim, dbt-postgres 1.3.1 -> 1.11.0 (dbt-core 1.12).
  Drop the no-op apt-get layer and the pytz pin, which current dbt resolves.
- Dockerfile.postgres: replace frantiseks/postgres-sakila, unmaintained and
  amd64-only, with the official postgres:18 image preloaded with Pagila. The
  SQL is fetched at build time via ADD, so nothing is vendored here and moving
  release is a one-line change to PAGILA_TAG. Pinned to pagila-v4.0.0: v4.1.0
  needs pgvector, which the official image does not carry.
- docker-compose.yml: healthcheck now checks TCP. The socket check went green
  while the entrypoint's temporary socket-only server was still loading, so
  dbt could start before Postgres accepted connections.
- docker-compose.yml: drop the obsolete top-level 'version' key.
- Snapshot block was named int_stock_balances_daily_grouped_by_day_snapshot
  while the file and _snapshots.yml both said int_customers_per_store_snapshot.
  Its not_null test therefore never ran. Renamed to match, taking the suite
  from 8 data tests to 9.
- Add .devcontainer/devcontainer.json and a Codespaces badge. Docker-in-docker
  plus 'docker compose up -d --build' on create, so the models are built by the
  time the editor opens.
- dbt_utils 1.0.0 -> 1.4.1. Untrack .DS_Store, add .gitignore.
- README: docker compose instead of docker-compose, correct the snapshot name
  in the example queries, use container names instead of the docker ps id
  lookup, document what the project builds, drop the credit banner, and use
  Dataminded as one word.

Verified: postgres service builds clean and dbt build passes 15/15 with no
warnings. The dbt image build itself is NOT verified: Docker Hub is unreachable
from this machine, so python:3.12-slim could not be pulled.
@jvanbuel
jvanbuel force-pushed the fix/modernize-stack branch from 58be010 to 6dedced Compare August 11, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant