Error during "docker compose up --watch" for a file sync event

I am using Docker CE version 26.1.3, build b72abbb
Host: Ubuntu 22.04.4 LTS x86_64

I have a docker-compose.yaml which has in it:

    user: "1000:1000"
...
    develop:
      watch:
        - action: sync
          path: .
          target: /app
          ignore: 
            - node_modules/
            - server.js
        - action: sync+restart
          path: ./server.js
          target: /app
          ignore: 
            - node_modules/
        - action: rebuild
          path: package.json

When I change a file for action “sync”, I get an error from docker.

$ docker compose up --watch
[+] Running 2/2
 ✔ Network videodownloaderweb_default  Created                                                                                     0.2s 
 ✔ Container videodownloaderweb        Created                                                                                     0.5s 
Attaching to videodownloaderweb
                    ⦿ Watch enabled
videodownloaderweb  | Server listening on port 3000
videodownloaderweb  | User connected
videodownloaderweb  | User connected
                    ⦿ Syncing "videodownloaderweb" after changes were detected
WARN[0070] Error handling changed files for service videodownloaderweb: 1 error occurred:
	* copying files to 86b7a6e4c00efdb4539e30b6696d158e553d3a05b3121346ca8be134427b6f2d: Error response from daemon: getent unable to find entry "1000:1000" in passwd database

If I try to use getent to query the passwd db myself to diagnose this issue, I can get the expected result, only if I query by “username:groupname”. Querying by “uid:gid” returns no such record.

This would explain why docker is failing. If it tries to pass uid:gid into getent, this will not return anything.

Note that when compose is up and watching, I can manually myself sync a given file with:

$ docker cp env.list videodownloaderweb:/app
Successfully copied 2.05kB to videodownloaderweb:/app

So why is docker engine unable to sync files via compose --watch?