Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Watch: exec mode

Aperta
#14,326 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@glours ci sta già lavorando.

Dal 12/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

kind/feature
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:
Lingua principale
Go
Stelle
38.4k
Fork
5.9k
Merge medio
2g 4h
PR unite (30g)
73

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di docker/compose

Tutte le issue di docker/compose

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.