This repository was archived by the owner on Apr 17, 2025. It is now read-only.
Commit 6d49996
authored
fix: update Dockerfile yarn installation to fix docker builds (#1)
I ran into two yarn-related issues when running docker builds.
First build failed with an error related to git:
```
> [build 5/15] RUN SKIP_POSTINSTALL=1 yarn install:
0.396 yarn install v1.22.22
0.477 [1/4] Resolving packages...
0.497 warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
0.656 warning Resolution field "@electron/[email protected]" is incompatible with requested version "@electron/[email protected]"
0.781 [2/4] Fetching packages...
8.047 error Couldn't find the binary git
```
I resolved this issue by installing `git` before running `yarn install`.
---
After this is resolved, now there's a later failure in `yarn install`:
```
38.69 [4/4] Building fresh packages...
40.02 error /usr/src/app/node_modules/postinstall-postinstall: Command failed.
40.02 Exit code: 1
40.02 Command: node ./run.js
40.02 Arguments:
40.02 Directory: /usr/src/app/node_modules/postinstall-postinstall
40.02 Output:
40.02 ✘ [ERROR] Could not resolve "/usr/src/app/redisinsight/ui/vite.config.mjs"
```
I resolved this issue by using the `yarn install --ignore-scripts`
option, which will correctly stop the postinstall scripts from running.
### Test Plan
Locally I ran docker build and confirmed it now works:
```
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04
Codename: noble
$ docker build .
...
=> => writing image sha256:91f310a1dd1781dba565af73f77f78da6b14fd2411e3e56257f68030663111c3 0.0s
```
Fixes redis#44041 parent b551c6a commit 6d49996
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments