Remove git dependency from Docker build via yarn resolution (#961)

Docker browser build fails because `@electron/rebuild` requires
`@electron/node-gyp` from a GitHub URL, which needs git to clone. The
package exists on npm registry but yarn.lock referenced the git URL.

## Changes

- **Added yarn resolution** to force
`@electron/node-gyp@10.2.0-electron.1` from npm registry instead of
GitHub
- **Removed git installation** from Dockerfile.browser builder stage
- **Updated yarn.lock** to resolve dependency from
`registry.yarnpkg.com` instead of `github.com`

```diff
// package.json
+ "resolutions": {
+   "@electron/node-gyp": "10.2.0-electron.1"
+ }
```

```diff
// Dockerfile.browser
- RUN apk add --no-cache git
```

This eliminates the git dependency entirely while preserving the exact
same package version.

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> build still fails
https://github.com/thomasnordquist/MQTT-Explorer/actions/runs/20443384267/job/58741359390


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thomasnordquist <7721625+thomasnordquist@users.noreply.github.com>
This commit is contained in:
Copilot
2025-12-22 22:02:18 +01:00
committed by GitHub
parent 85475a9201
commit 308b748d0e
3 changed files with 6 additions and 5 deletions

View File

@@ -46,6 +46,9 @@
"type": "git",
"url": "https://github.com/thomasnordquist/MQTT-Explorer.git"
},
"resolutions": {
"@electron/node-gyp": "10.2.0-electron.1"
},
"build": {
"appId": "mqtt-explorer",
"productName": "MQTT Explorer",