Skip to content

build(docker): postgresql-client instead of full postgresql server + sqlite3 - #153

Open
onelapahead wants to merge 2 commits into
release-v1.5.0from
postgresql-client-release-v1.5.0
Open

build(docker): postgresql-client instead of full postgresql server + sqlite3#153
onelapahead wants to merge 2 commits into
release-v1.5.0from
postgresql-client-release-v1.5.0

Conversation

@onelapahead

@onelapahead onelapahead commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Replaces the curl, jq, sqlite3, and postgresql apt packages in the final image with just postgresql-client.

Nothing in FireFly executes external database binaries — the postgres and sqlite3 plugins use in-process database/sql drivers (internal/database/postgres, internal/database/sqlite3), and migrations run via golang-migrate as a library (GetMigrationDriver), never by shelling out. The psql client was originally added purely as a debugging utility (73a4ef7, on Alpine as postgresql-client); the Ubuntu base-image migration translated it to postgresql, which on Ubuntu is the metapackage that pulls in the entire PostgreSQL server. The sqlite3 CLI is likewise debug-only tooling, and the Kaleido platform always runs firefly-core against postgres. curl and jq are also debug-only in the final stage — no HEALTHCHECK or script uses them (builder stages install their own).

Dropping the server package tree and the debug CLIs shrinks the image and removes a recurring source of CVE scan findings, while keeping psql available for debugging.

…erver and sqlite3

Nothing in FireFly executes external database binaries: the postgres and
sqlite3 plugins use in-process database/sql drivers, and migrations run
via golang-migrate as a library. The psql client was originally added as
a debugging utility (73a4ef7, on Alpine as postgresql-client); the
Ubuntu base-image migration translated it to 'postgresql', which on
Ubuntu is the full server metapackage. The sqlite3 CLI is likewise
debug-only tooling, and the Kaleido platform always runs firefly against
postgres. Dropping both shrinks the image and its CVE surface while
keeping psql for debugging.
@onelapahead
onelapahead requested a review from a team as a code owner August 19, 2026 18:34
Debug-only utilities like psql; nothing in the final stage uses them
(no HEALTHCHECK, no scripts). Builder stages install their own curl.
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