Error in docker build
See original GitHub issueDescribe the bug
.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! find Python Python is not set from command line or npm configuration
.../node_modules/bufferutil install: gyp ERR! find Python Python is not set from environment variable PYTHON
.../node_modules/bufferutil install: gyp ERR! find Python checking if "python3" can be used
.../node_modules/bufferutil install: gyp ERR! find Python - "python3" is not in PATH or produced an error
.../node_modules/bufferutil install: gyp ERR! find Python checking if "python" can be used
.../node_modules/bufferutil install: gyp ERR! find Python - "python" is not in PATH or produced an error
.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
.../node_modules/bufferutil install: gyp ERR! find Python You need to install the latest version of Python.
.../node_modules/bufferutil install: gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
.../node_modules/bufferutil install: gyp ERR! find Python you can try one of the following options:
.../node_modules/bufferutil install: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
.../node_modules/bufferutil install: gyp ERR! find Python (accepted by both node-gyp and npm)
.../node_modules/bufferutil install: gyp ERR! find Python - Set the environment variable PYTHON
.../node_modules/bufferutil install: gyp ERR! find Python - Set the npm configuration variable python:
.../node_modules/bufferutil install: gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
.../node_modules/bufferutil install: gyp ERR! find Python For more information consult the documentation at:
.../node_modules/bufferutil install: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
.../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! configure error
.../node_modules/bufferutil install: gyp ERR! stack Error: Could not find any Python installation to use
.../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:330:47)
.../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:159:21)
.../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:202:16)
.../node_modules/bufferutil install: gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:294:16)
.../node_modules/bufferutil install: gyp ERR! stack at exithandler (node:child_process:408:5)
.../node_modules/bufferutil install: gyp ERR! stack at ChildProcess.errorhandler (node:child_process:420:5)
.../node_modules/bufferutil install: gyp ERR! stack at ChildProcess.emit (node:events:513:28)
.../node_modules/bufferutil install: gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
.../node_modules/bufferutil install: gyp ERR! stack at onErrorNT (node:internal/child_process:478:16)
.../node_modules/bufferutil install: gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
.../node_modules/bufferutil install: gyp ERR! System Linux 5.15.61-v8+
.../node_modules/bufferutil install: gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
.../node_modules/bufferutil install: gyp ERR! cwd /app/node_modules/.pnpm/bufferutil@4.0.6/node_modules/bufferutil
.../node_modules/bufferutil install: gyp ERR! node -v v16.17.0
.../node_modules/bufferutil install: gyp ERR! node-gyp -v v9.1.0
.../node_modules/bufferutil install: gyp ERR! not ok
.../node_modules/bufferutil install: Failed
ELIFECYCLE Command failed with exit code 1.
The command '/bin/sh -c pnpm install --frozen-lockfile' returned a non-zero code: 1
ERROR: Service 'app' failed to build : Build failed
Reproduction
Docker building
System Info
System:
OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
CPU: (4) arm64 unknown
Memory: 405.04 MB / 3.72 GB
Container: Yes
Shell: 5.1.4 - /bin/bash
Binaries:
Node: 14.20.1 - /usr/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 6.14.17 - /usr/bin/npm
Browsers:
Firefox: 102.3.0esr
Used Package Manager
pnpm
Validations
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:19 (12 by maintainers)
Top Results From Across the Web
Docker: “build” Requires 1 Argument Error - Baeldung
The most common reason for “Docker build Requires 1 Argument” error is when we try to build the image without providing sufficient arguments....
Read more >docker - Error on building Dockerfile to Image - Stack Overflow
The error means it can't find the directory which mean it probably doesn't exist or you are doing it the wrong way.
Read more >How to debug build failures - Docker Community Forums
I've written a guide on how to debug docker builds like that. In short, look at the container ID of the failed step,...
Read more >An error occurred while attempting to build Docker image #3884
I have been hitting the same issue since I upgraded to Windows 10 1903 (OS Build 18362.175) but have a much simpler Dockerfile....
Read more >Docker build failes with dockerfile created by VS
Original dockerfile generated by VS2017: I'm using containers for linux. The error I'm getting in both cases (locally executing `docker build` and CI ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It was during the pnpm db:push, after your update, everything is working perfectly now. Cheers!
Yeah so I added that exact thing but only in the
buildDocker stage, forprisma generate. See the same PR I linked previously.When is that happening specifically? When seeding the db / applying initial migrations? I think I know what needs to be changed then. We’ll also need to include
opensslin thereleaseDocker stage. Thanks for the heads up!EDIT: @iamnhx just pushed the update to
main. Will update the latest Docker image on docker hub as well in 2 min 👍