Skip to content

Add: psql, mariadb, sqlite#7

Merged
Taegost merged 3 commits into
mainfrom
add_db_tools
Apr 27, 2026
Merged

Add: psql, mariadb, sqlite#7
Taegost merged 3 commits into
mainfrom
add_db_tools

Conversation

@Taegost
Copy link
Copy Markdown
Owner

@Taegost Taegost commented Apr 27, 2026

Summary by CodeRabbit

  • New Features

    • Development environment now includes psql, MariaDB/MySQL client, and sqlite3 CLI tools.
    • PostgreSQL client major version can be configured via an environment variable.
  • Documentation

    • Tool reference updated to list the new database clients.
  • Chores

    • Development container and environment configs updated to persist SSH host keys and include new local settings for development.

@Taegost Taegost self-assigned this Apr 27, 2026
@Taegost Taegost added the enhancement New feature or request label Apr 27, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 47c50e1d-79cc-4494-b6de-52e9ae4dbde9

📥 Commits

Reviewing files that changed from the base of the PR and between 00d344c and 3824d8f.

📒 Files selected for processing (1)
  • Dockerfile
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and Push
🧰 Additional context used
🪛 Hadolint (2.14.0)
Dockerfile

[warning] 92-92: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)

🔇 Additional comments (2)
Dockerfile (2)

62-75: Good addition of DB clients in the base package layer.

mariadb-client and sqlite3 are integrated cleanly into the existing apt install step, and the layer still performs apt metadata cleanup.


90-104: PGDG install block looks correct and well-contained.

Nice improvement: the temporary PGDG source and key are cleaned up in the same layer after installation, which avoids cross-step apt repository coupling.


📝 Walkthrough

Walkthrough

Adds database CLI clients (psql, mariadb/mysql, sqlite3) to the Dockerfile with a POSTGRESQL_CLIENT_VERSION build arg; updates .env.example with POSTGRESQL_CLIENT_VERSION; persists SSH known_hosts via devcontainer mount; and adds a local Claude settings JSON granting WebFetch for MariaDB domains.

Changes

Cohort / File(s) Summary
Docker + env
Dockerfile, .env.example
Adds mariadb-client and sqlite3; introduces ARG POSTGRESQL_CLIENT_VERSION=18, configures PGDG APT source, and installs postgresql-client-${POSTGRESQL_CLIENT_VERSION}. Adds POSTGRESQL_CLIENT_VERSION=18 to .env.example.
Devcontainer
.devcontainer/example/devcontainer.json
Adds a writable bind mount for ~/.ssh/known_hosts into the container to persist SSH host keys.
Docs
README.md
Updates "What's Inside" table to list psql, mariadb / mysql, and sqlite3, pointing to the Dockerfile for versions.
Local AI settings
.claude/settings.local.json
New local Claude settings file adding permissions.allow entries to grant WebFetch for mariadb.com, downloads.mariadb.com, mariadb.org, and legacy-downloads.mariadb.com.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰
I hopped through layers, added clients with care,
Kept SSH known_hosts so hosts stay there.
Psql, Maria, SQLite—tools in the light,
Claude can fetch MariaDB pages at night.
Hop-hop, builds ready, everything's in sight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the main objective of the changeset: adding three database CLI client tools (psql, mariadb, sqlite) to the development container.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add_db_tools

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Dockerfile`:
- Around line 92-103: The current multi-command piped RUN that imports the PGDG
key should be rewritten to use explicit intermediate files and individual checks
so failures aren't masked by pipelines: in the Dockerfile RUN block that
references TARGETARCH and POSTGRESQL_CLIENT_VERSION, first curl the ASC key into
a temp file and check its exit status, then run gpg --dearmor reading that temp
file and write to /etc/apt/keyrings/postgresql.gpg (or a temp gpg file and move
it), verify the gpg command succeeded, then create the sources.list.d entry
using the TARGETARCH and lsb_release substitution, run apt-get update and
apt-get install postgresql-client-${POSTGRESQL_CLIENT_VERSION} with explicit
checks, remove /var/lib/apt/lists/* and temp files, and finally run psql
--version to confirm installation; this eliminates piping and ensures
deterministic failure points.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4feb8c61-bff1-427b-b2de-c0004c8300bd

📥 Commits

Reviewing files that changed from the base of the PR and between ee39cae and 36c53aa.

📒 Files selected for processing (5)
  • .claude/settings.local.json
  • .devcontainer/example/devcontainer.json
  • .env.example
  • Dockerfile
  • README.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and Push
🧰 Additional context used
🪛 Hadolint (2.14.0)
Dockerfile

[warning] 92-92: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)


[warning] 92-92: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

(DL4006)

🔇 Additional comments (5)
.devcontainer/example/devcontainer.json (1)

38-39: Good mount layering for known_hosts persistence.

This keeps the broader SSH directory read-only while allowing host key updates to persist across rebuilds.

.claude/settings.local.json (1)

1-10: Scoped permission list looks appropriately constrained.

The allow-list is explicit and limited to MariaDB-related domains.

Dockerfile (1)

62-67: Database client additions are clear and consistent with the image scope.

Nice inclusion of MariaDB and SQLite CLIs in the base system package layer.

.env.example (1)

17-24: Version reference + new PostgreSQL pin are well aligned.

POSTGRESQL_CLIENT_VERSION in .env.example matches the new Docker build argument and keeps local-build overrides coherent.

Also applies to: 46-47

README.md (1)

32-34: Docs update is accurate and useful.

The new database CLI rows in “What’s Inside” correctly reflect the tooling added in this PR.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Dockerfile`:
- Around line 92-103: In the Dockerfile RUN block that adds the PGDG repo (using
TARGETARCH and POSTGRESQL_CLIENT_VERSION and ending with psql --version), remove
the temporary artifacts after installing postgresql-client: delete
/etc/apt/sources.list.d/postgresql.list and the GPG file
/etc/apt/keyrings/postgresql.gpg (and ensure /tmp/postgresql.asc is removed), so
the PGDG APT source and key do not persist for later apt-get update steps (keep
the install steps unchanged, just add cleanup of those files at the end of that
RUN).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4c66c24e-33bb-41c2-bd32-0fefa5d143fa

📥 Commits

Reviewing files that changed from the base of the PR and between 36c53aa and 00d344c.

📒 Files selected for processing (1)
  • Dockerfile
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and Push
🧰 Additional context used
🪛 Hadolint (2.14.0)
Dockerfile

[warning] 92-92: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)

🔇 Additional comments (1)
Dockerfile (1)

62-67: Good placement of new DB clients in the existing system-packages layer.

This keeps layer count and cache behavior consistent with the rest of the Dockerfile.

Comment thread Dockerfile
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@Taegost Taegost merged commit 17bf1ec into main Apr 27, 2026
2 checks passed
@Taegost Taegost deleted the add_db_tools branch April 27, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant