deb: use `dh-sequence-installsysusers` instead of manual `postinst` to setup `docker` group
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- debian, dockerfile
- 领域
- devops
调研方向
Read the linked pull request discussions and inspect deb/common/control, deb/common/docker-ce.docker.sysusers, deb/common/docker-ce.postinst, and deb/common/rules. Check how the Debian packaging currently creates the docker group, then build and test the package to verify the sysusers sequence replaces the manual post-install setup. Done means the package creates the group through dh-sequence-installsysusers and retains the docker service name.
由索引模型根据 Issue 内容生成。
描述
relates to:
- follow-up to https://github.com/docker/docker-ce-packaging/pull/1195
- implementing https://github.com/docker/docker-ce-packaging/pull/1187#discussion_r2083279213
- https://github.com/docker/docker-ce-packaging/pull/1196#discussion_r2116353043
See https://github.com/docker/docker-ce-packaging/pull/1196#discussion_r2116353043 for more details;
So in theory, this should be enough:
$ git --no-pager diff --staged --irreversible-delete
diff --git a/deb/common/control b/deb/common/control
index e2438b9..48b9561 100644
--- a/deb/common/control
+++ b/deb/common/control
@@ -6,8 +6,9 @@ Build-Depends: bash,
bash-completion,
ca-certificates,
cmake,
+ debhelper-compat (= 13),
dh-apparmor,
- debhelper-compat (= 12),
+ dh-sequence-installsysusers,
gcc,
git,
libc-dev,
diff --git a/deb/common/docker-ce.docker.sysusers b/deb/common/docker-ce.docker.sysusers
new file mode 120000
index 0000000..eddc903
--- /dev/null
+++ b/deb/common/docker-ce.docker.sysusers
@@ -0,0 +1 @@
+../engine/contrib/systemd-sysusers/docker.conf
\ No newline at end of file
diff --git a/deb/common/docker-ce.postinst b/deb/common/docker-ce.postinst
deleted file mode 100755
index eeef6ca..0000000
diff --git a/deb/common/rules b/deb/common/rules
index a25eae2..3fd39ae 100755
--- a/deb/common/rules
+++ b/deb/common/rules
@@ -141,6 +141,10 @@ override_dh_installsystemd:
# use "docker" as our service name, not "docker-ce"
dh_installsystemd --name=docker
+override_dh_installsysusers:
+ # use "docker" as our service name, not "docker-ce"
+ dh_installsysusers --name=docker
+
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
- 主要语言
- Dockerfile
- 星标
- 37
- 派生
- 42
- 平均合并
- 16 小时 53 分钟
- 30 天内合并 PR
- 30
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker/packaging 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
docker/packaging#586 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
docker/packaging#558 · 1 个 reaction ·
维护者通常 1 天内回复
-
docker-ce is unable to be installed on UBI 10 container images because iptables-nft is not available未关闭
难度 3/5 1-2 天 新手友好度 52/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 42/100
维护者通常 1 天内回复
相似的 Issue
-
breaking change
难度 1/5 1 小时以内 新手友好度 84/100
it-at-m/lhm_actions#441 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
tchiotludo/akhq#3438 ·
维护者通常 1 天内回复
-
good first issue help wanted security
难度 2/5 1-3 小时 新手友好度 82/100
gsel001/one-meal-forward#22 ·
-
Run the race detector on internal/restapi in CI可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
OneBusAway/maglev#2135 ·
维护者通常 2 天内回复
-
priority/medium status/ready type/chore
难度 2/5 1-3 小时 新手友好度 84/100
discobox-ai/discobox#1357 ·
维护者通常 1 天内回复