Lacking sensible instructions in the Docker Hub readme
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- docker, postgres, shell
- 领域
- databases, devops, documentation, security
调研方向
从 Docker Hub 的 README 和 issue 中引用的 docker-library/docs 仓库开始。检查提供的 init-db.sh 示例以及现有的 rootless Postgres 指南,包括已过时的 pull request 链接。完成应意味着已确定一致的范围,并有一份完整、未截断的指南,涵盖安全的用户设置和非特权运行。
由索引模型根据 Issue 内容生成。
描述
Hi,
The Docker Hub readme instructs users to treat a container with $POSTGRES_PASSWORD supplied as immediately usable, which can only be true if the user's intention was to grant their application superuser access to the database (and is only possible because the variable name belies its true function). Creating an unprivileged user is an afterthought relegated to below-the-fold, requires an init script be mounted, and the example doesn't even demonstrate setting up an auth mechanism for the new user. At the bare minimum I'd expect an environment-based facility to create an unprivileged user (I've included my own init script below for reference).
Additionally, the instructions on running the container itself unprivileged are also below the fold, and the most apparently useful of the options given is a link to a half-decade-old pull request which includes no documentation and has since been almost completely reworked in master. I still haven't figured out how to make rootless postgres work as yet.
Finally, the Hub readme (despite not informing users of how to run either the container or the database itself securely) is truncated for exceeding the 25,000 word limit on Docker Hub.
The postgres Docker image needn't provision the Fort Knox of configurations, but users ought to at least be reasonably informed, particularly about security implications, and given the information/tools to provision a container utilizing the bare minimum security good practice. Is there a process that can be kicked off for reconsidering some of these approaches please?
I'm happy to open this issue over at docker-library/docs if necessary, but since this involves issues with the image itself this seemed a more appropriate place.
Thank you.
init-db.sh
#!/bin/bash
set -euo pipefail
psql -v ON_ERROR_STOP=1 --username postgres --dbname postgres --set pass="$DB_PASSWORD" <<-EOF
CREATE USER '$DB_USER' WITH ENCRYPTED PASSWORD :'pass';
CREATE DATABASE '$DB_USER' WITH OWNER '$DB_USER' TEMPLATE template0 ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';
EOF
- 主要语言
- Shell
- 星标
- 2.5k
- 派生
- 1.2k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker-library/postgres 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
docker-library/postgres#1420 ·
-
难度 4/5 3-5 天 新手友好度 48/100
docker-library/postgres#1419 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
docker-library/postgres#1389 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
docker-library/postgres#1356 · 5 条评论 · 7 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 25/100
docker-library/postgres#1355 · 10 条评论 · 11 个 reaction ·
查看 docker-library/postgres 的全部 Issue
相似的 Issue
-
package-update
难度 2/5 1-3 小时 新手友好度 68/100
oSoWoSo/vOid_Community_repOsitory#203 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug] v-quick-install-app install crashes with ValueError if no supported PHP version is installed未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
chore
难度 2/5 1-3 小时 新手友好度 84/100
alunduil/alunduil-chezmoi#809 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
type: bug
难度 2/5 1-3 小时 新手友好度 67/100
catppuccin/kde#152 ·