firebase / firebase/firebase-tools
`firebase deploy` crashes if under Docker and `firebase-debug.log` is mapped to host
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
I do deployments under Docker Compose. To get debugging information to the host, I mapped the `firebase-debug.log` file as follows:
```
- ./tmp/firebase-debug.log:/work/firebase-debug.log:rw
```
The logs are seen at the host (mapping works), and also deployment succeeds.
```
[info] ✔ Deploy complete!
[info]
[info] Project Console: https://console.firebase.google.com/project/groundlevel-sep22/overview
[debug] [2022-10-26T07:09:58.120Z] Error: EBUSY: resource busy or locked, unlink '/work/firebase-debug.log'
at Object.unlinkSync (node:fs:1767:3)
at process. (/usr/local/share/.config/yarn/global/node_modules/firebase-tools/lib/bin/firebase.js:84:12)
at process.emit (node:events:525:35)
at process.exit (node:internal/process/per_thread:190:15)
at /usr/local/share/.config/yarn/global/node_modules/firebase-tools/lib/command.js:105:25
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[error]
[error] Error: An unexpected error has occurred.
```
However, the above error happens when the `firebase-tools` process is terminating. For some reason (I don't know, why) it doesn't like the Docker Compose mapping.
**Work-around:**
Do not map `firebase-debug.log`.
**Further**
I decided to report this, since such rare errors might be indicative of some other, structural weakness within the code base.
Also, I have not observed similar behaviour with any other code I'm running, within Docker Compose.
### [REQUIRED] Environment info
|||
|---|---|
|`firebase-tools`|11.15.0|
|Platform|Docker Desktop for Mac/Windows, 4.13.1|
### [REQUIRED] Test case
Sorry, none.
I can provide the larger repo where this can be tested (taking less than 5 minutes), on request.
### [REQUIRED] Steps to reproduce
### [REQUIRED] Expected behavior
Deployment should work, under Docker Compose, with logs mapped to the host.
### [REQUIRED] Actual behavior
Deployment works, but the process crashes on exit.
Contributor guide
Assessment
This issue has not been assessed yet.