概要
- フル名
docker.io/kdhrubo/db2rest- Registry
- docker.io
- 名前空間
- kdhrubo
- リポジトリ
- db2rest
- キャッシュ Tag 数
- 56
- 最終同期
- 07/06/2026, 02:48 PM
概要
Db2Rest 开源镜像,将 PostgreSQL/MySQL 等关系库表自动暴露为 REST API,适合快速原型、内网数据网关与低代码后端。
詳細
kdhrubo/db2rest 读取数据库元数据并生成 CRUD HTTP 端点,支持 JWT、分页与 OpenAPI 文档。典型用于内部工具或 BFF 层快速对接遗留库,非完整 ORM 框架替代品。与 Hasura 相比更轻、偏 JDBC 直连;生产应固定 tag、只读账号最小权限,并通过反向代理启用 HTTPS 与 rate limit。
快速启动
docker run -d --name db2rest \
-p 8080:8080 \
-e DB_URL=jdbc:postgresql://postgres:5432/mydb \
-e DB_USER=readonly \
-e DB_PASSWORD=secret \
docker.io/kdhrubo/db2rest:latest
推荐实践
docker run -d --name db2rest \
--restart unless-stopped \
-p 8080:8080 \
-e DB_URL=jdbc:postgresql://postgres.internal:5432/app \
-e DB_USER=db2rest_ro \
-e DB_PASSWORD=strong-pass \
-e JWT_SECRET=long-random-secret \
-e SERVER_PORT=8080 \
docker.io/kdhrubo/db2rest:1.2.0
核心参数说明
-p 8080:8080— REST API 监听端口-e DB_URL— JDBC 连接串-e DB_USER/DB_PASSWORD— 数据库凭据(建议只读)-e JWT_SECRET— API 鉴权签名密钥--restart unless-stopped— 内网网关持续可用- 固定 tag — 与 API 行为版本 pin
Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: db2rest
spec:
replicas: 2
selector:
matchLabels:
app: db2rest
template:
metadata:
labels:
app: db2rest
spec:
containers:
- name: db2rest
image: docker.io/kdhrubo/db2rest:1.2.0
ports:
- containerPort: 8080
envFrom:
- secretRef:
name: db2rest-secrets
---
apiVersion: v1
kind: Service
metadata:
name: db2rest
spec:
selector:
app: db2rest
ports:
- port: 8080
targetPort: 8080
JDBC 与 JWT 经 Secret 注入;Ingress 暴露 HTTPS 并限制来源 IP,数据库连接指向集群外或 RDS。
最新 Tag(20 件)
すべての 56 件の Tag を見る →| Tag | アーキテクチャ | プッシュ日時 | サイズ | Digest | 同期 | 期望 | 操作 |
|---|---|---|---|---|---|---|---|
docker.io/kdhrubo/db2rest :latest | linux/amd64 | 2025/12/21 10:06 | 126.1 MB | sha256:e20610ff81b0… | |||
docker.io/kdhrubo/db2rest :v1.6.8 | linux/amd64 | 2025/12/21 10:06 | 126.1 MB | sha256:e20610ff81b0… | |||
docker.io/kdhrubo/db2rest :v1.6.8-RC1 | linux/amd64 | 2025/12/21 09:24 | 126.1 MB | sha256:63f1958d695f… | |||
docker.io/kdhrubo/db2rest :v1.6.6-GA | linux/amd64 | 2025/09/27 09:37 | 129.2 MB | sha256:e57c9bccd03b… | |||
docker.io/kdhrubo/db2rest :v1.6.6-RC2 | linux/amd64 | 2025/09/27 09:24 | 129.2 MB | sha256:5c5212514678… | |||
docker.io/kdhrubo/db2rest :v1.6.6-RC1 | linux/amd64 | 2025/09/26 11:45 | 129.2 MB | sha256:5d39e0794bf2… | |||
docker.io/kdhrubo/db2rest :v1.6.6 | linux/amd64 | 2025/09/26 11:13 | 129.2 MB | sha256:c06160b65e76… | |||
docker.io/kdhrubo/db2rest :v1.6.5 | linux/amd64 | 2025/07/19 12:35 | 123.3 MB | sha256:63523cd73c5b… | |||
docker.io/kdhrubo/db2rest :v1.6.4 | linux/amd64 | 2025/07/18 06:06 | 109.6 MB | sha256:3f7aeaf282b6… | |||
docker.io/kdhrubo/db2rest :v1.6.4-RC1 | linux/amd64 | 2025/07/18 05:58 | 109.6 MB | sha256:2dabbd3f7220… | |||
docker.io/kdhrubo/db2rest :v1.6.1 | linux/amd64 | 2025/07/04 07:38 | 109.6 MB | sha256:0b915e82f6b5… | |||
docker.io/kdhrubo/db2rest :v1.6.0 | linux/amd64 | 2025/03/08 19:03 | 109.9 MB | sha256:af1350aae293… | |||
docker.io/kdhrubo/db2rest :v1.5.1 | linux/amd64 | 2025/02/04 23:00 | 116.1 MB | sha256:be67c12eec95… | |||
docker.io/kdhrubo/db2rest :v1.5.0 | linux/amd64 | 2025/02/04 17:11 | 135.0 MB | sha256:76301e196dc1… | |||
docker.io/kdhrubo/db2rest :v1.4.2 | linux/amd64 | 2024/12/15 13:23 | 113.5 MB | sha256:a3004839307a… | |||
docker.io/kdhrubo/db2rest :v1.4.1 | linux/amd64 | 2024/11/30 19:05 | 113.5 MB | sha256:0698ca3ce1ff… | |||
docker.io/kdhrubo/db2rest :v1.4.0 | linux/amd64 | 2024/11/25 15:38 | 113.4 MB | sha256:00805bd68f90… | |||
docker.io/kdhrubo/db2rest :v1.3.8-RC21 | linux/amd64 | 2024/11/25 13:52 | 113.3 MB | sha256:c779b1774360… | |||
docker.io/kdhrubo/db2rest :v1.3.8-RC20 | linux/amd64 | 2024/11/25 13:01 | 377.6 MB | sha256:e2c7e919d297… | |||
docker.io/kdhrubo/db2rest :v1.3.8-RC19 | linux/amd64 | 2024/11/25 12:58 | 53.3 MB | sha256:0ab6131d4de0… |