socket.io-admin-ui icon indicating copy to clipboard operation
socket.io-admin-ui copied to clipboard

docker image build failed

Open sercangoger opened this issue 1 year ago • 4 comments

I want to convert the project into a docker image and run it, but I get the following error.

**47.41 Building: /usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= 47.47 gyp info it worked if it ends with ok 47.47 gyp verb cli [ 47.47 gyp verb cli '/usr/local/bin/node', 47.47 gyp verb cli '/app/node_modules/node-gyp/bin/node-gyp.js', 47.47 gyp verb cli 'rebuild', 47.47 gyp verb cli '--verbose', 47.47 gyp verb cli '--libsass_ext=', 47.47 gyp verb cli '--libsass_cflags=', 47.47 gyp verb cli '--libsass_ldflags=', 47.47 gyp verb cli '--libsass_library=' 47.47 gyp verb cli ] 47.47 gyp info using [email protected] 47.47 gyp info using [email protected] | linux | arm64 47.47 gyp verb command rebuild [] 47.47 gyp verb command clean [] 47.48 gyp verb clean removing "build" directory 47.48 gyp verb command configure [] 47.49 gyp verb check python checking for Python executable "python2" in the PATH 47.49 gyp verb which failed Error: not found: python2 47.49 gyp verb which failed at getNotFoundError (/app/node_modules/which/which.js:13:12) 47.49 gyp verb which failed at F (/app/node_modules/which/which.js:68:19) 47.49 gyp verb which failed at E (/app/node_modules/which/which.js:80:29) 47.49 gyp verb which failed at /app/node_modules/which/which.js:89:16 47.49 gyp verb which failed at /app/node_modules/isexe/index.js:42:5 47.49 gyp verb which failed at /app/node_modules/isexe/mode.js:8:5 47.49 gyp verb which failed at FSReqCallback.oncomplete (fs.js:192:21) 47.49 gyp verb which failed python2 Error: not found: python2 47.49 gyp verb which failed at getNotFoundError (/app/node_modules/which/which.js:13:12) 47.49 gyp verb which failed at F (/app/node_modules/which/which.js:68:19) 47.49 gyp verb which failed at E (/app/node_modules/which/which.js:80:29) 47.49 gyp verb which failed at /app/node_modules/which/which.js:89:16 47.49 gyp verb which failed at /app/node_modules/isexe/index.js:42:5 47.49 gyp verb which failed at /app/node_modules/isexe/mode.js:8:5 47.49 gyp verb which failed at FSReqCallback.oncomplete (fs.js:192:21) { 47.49 gyp verb which failed code: 'ENOENT' 47.49 gyp verb which failed } 47.49 gyp verb check python checking for Python executable "python" in the PATH 47.49 gyp verb which succeeded python /usr/bin/python 47.51 gyp ERR! configure error 47.51 gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3]; 47.51 gyp ERR! stack File "", line 1 47.51 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; 47.51 gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 47.51 gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? 47.51 gyp ERR! stack 47.51 gyp ERR! stack at ChildProcess.exithandler (child_process.js:383:12) 47.51 gyp ERR! stack at ChildProcess.emit (events.js:400:28) 47.51 gyp ERR! stack at maybeClose (internal/child_process.js:1088:16) 47.51 gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5) 47.51 gyp ERR! System Linux 6.5.11-linuxkit 47.51 gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" 47.51 gyp ERR! cwd /app/node_modules/node-sass 47.51 gyp ERR! node -v v14.21.3 47.51 gyp ERR! node-gyp -v v3.8.0 47.51 gyp ERR! not ok 47.52 Build failed with error code: 1 48.02 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents): 48.02 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"}) 48.03 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents): 48.03 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"}) 48.04 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents): 48.04 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"}) 48.04 48.15 npm ERR! code ELIFECYCLE 48.15 npm ERR! errno 1 48.15 npm ERR! [email protected] postinstall: node scripts/build.js 48.15 npm ERR! Exit status 1 48.15 npm ERR! 48.15 npm ERR! Failed at the [email protected] postinstall script. 48.15 npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 48.17 48.17 npm ERR! A complete log of this run can be found in: 48.17 npm ERR! /root/.npm/_logs/2024-01-02T11_17_46_603Z-debug.log

Dockerfile:10

8 | RUN npm install -g gyp 9 | RUN apk add g++ make py3-pip 10 | >>> RUN npm install 11 |
12 | # Bundle app source

ERROR: failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/upuy4whk515yr6won5uj9fk0g**

sercangoger avatar Jan 02 '24 11:01 sercangoger