Watch: exec mode
维护者通常 1 天内回复
@glours 已经在做这个了。
开始于 2026年10月12日。
评估
这个 Issue 还没有评估数据。
描述
Description
In https://github.com/docker/compose/pull/12330, sync+exec mode was introduced as a watch action.
I would like to request an additional action that only performs the exec part, without syncing any files.
Use case
My application code is bind-mounted into the container using volumes. On files changes I don't need the files copied in, as the volume mount already takes care of that, only a command run inside the container: here, rr reset to restart the RoadRunner workers, which is much faster than restarting the whole container.
sync+exec is the only action that runs a command, so I use it at the moment. But syncing into the bind-mounted path writes the files back onto the host (with the container user's ownership and second-precision timestamps). The watcher sees its own write as a new change and syncs again, so it loops every second.
My current workaround is to sync into a throwaway path inside the container just to trigger the exec:
develop:
watch:
- action: sync+exec
path: ./src
target: /tmp/src-watch # throwaway; ./src is already bind-mounted at /code/src
exec:
command: rr reset http
This avoids triggering the endless loop described above.
Proposal
An exec action that runs the exec command on a change and takes no target:
develop:
watch:
- action: exec
path: ./src
exec:
command: rr reset http
Thank you!
Related:
- 主要语言
- Go
- 星标
- 38.5k
- 派生
- 5.9k
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 63
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker/compose 的其他 Issue
-
[BUG] deploy.restart_policy without condition drops the restart policy可能已有人在做 @akshat-lakhera 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
docker/compose#14383 · 1 条评论 ·
维护者通常 1 天内回复
-
kind/bug status/0-triage
难度 3/5 1-2 天 新手友好度 56/100
docker/compose#14386 · 1 条评论 ·
维护者通常 1 天内回复
-
[BUG] `depends_on` health/completion waits always sleep 500ms before the first check可能已有人在做 @htoyoda18 于 2 天前认领。 未关闭kind/bug status/0-triage
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 1 天内回复
-
[BUG] down -v removes a named volume owned by another project可能已有人在做 @htoyoda18 于 5 天前认领。 未关闭kind/bug
难度 3/5 1-2 天 新手友好度 73/100
维护者通常 1 天内回复
-
[BUG] A start failure in one service aborts the start of unrelated services (unreleased regression)未关闭kind/bug
难度 4/5 3-5 天 新手友好度 57/100
docker/compose#14372 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area/frontend/library-panels automated-triage type/bug type/ux
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
microsoft/azure-linux-image-tools#954 ·
维护者通常 1 天内回复
-
panic "time: missing Location in call to Time.In" on MySQL via aws_rds since v0.8.0可能已有人在做 @tylertechgraves 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
open-policy-agent/opa-control-plane#452 · 1 条评论 ·
维护者通常 1 天内回复
-
[bug bash] Actor logs are controlled by Kubernetes RBAC on the pool namespace, not atespace roles未关闭area/cli area/security bug-bash kind/docs
难度 1/5 1-3 小时 新手友好度 80/100
agent-substrate/substrate#3242 ·
维护者通常 1 天内回复