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:
@@ -4,9 +4,6 @@ FROM node:24-alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Install git (required for git-based dependencies like @electron/node-gyp)
|
||||
RUN apk add --no-cache git
|
||||
|
||||
# Copy package files for dependency installation
|
||||
COPY package.json yarn.lock ./
|
||||
COPY app/package.json ./app/
|
||||
|
||||
Reference in New Issue
Block a user