Lissy93 / web-check

🕵️‍♂️ All-in-one OSINT tool for analysing any website
https://web-check.xyz
MIT License
20.95k stars 1.56k forks source link

Building Docker Images for ARM64 #73

Closed CarlZhang18 closed 4 months ago

CarlZhang18 commented 5 months ago

When I pull the image, Docker prompts "no matching manifest for linux/arm64/v8 in the manifest list entries."

How to Resolve

ncarvajalc commented 4 months ago

Also when trying to build from source in Mac:

nicolascarvajal@MBP-Nico web-check % docker build -t web-check .
[+] Building 90.3s (8/12)                                                                                                                                                                                                                                                                             docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                  0.0s
 => => transferring dockerfile: 661B                                                                                                                                                                                                                                                                                  0.0s
 => [internal] load metadata for docker.io/library/node:16-buster-slim                                                                                                                                                                                                                                                0.7s
 => [internal] load .dockerignore                                                                                                                                                                                                                                                                                     0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                       0.0s
 => [internal] load build context                                                                                                                                                                                                                                                                                     0.0s
 => => transferring context: 12.09kB                                                                                                                                                                                                                                                                                  0.0s
 => [build 1/6] FROM docker.io/library/node:16-buster-slim@sha256:3ebf2875c188d22939c6ab080cfb1a4a6248cc86bae600ea8e2326aa03acdb8f                                                                                                                                                                                    0.0s
 => CACHED [build 2/6] WORKDIR /app                                                                                                                                                                                                                                                                                   0.0s
 => CACHED [build 3/6] COPY package.json yarn.lock ./                                                                                                                                                                                                                                                                 0.0s
 => ERROR [build 4/6] RUN apt-get update &&     yarn install --production &&     rm -rf /app/node_modules/.cache                                                                                                                                                                                                     89.6s
------                                                                                                                                                                                                                                                                                                                     
 > [build 4/6] RUN apt-get update &&     yarn install --production &&     rm -rf /app/node_modules/.cache:                                                                                                                                                                                                                 
0.489 Get:1 http://deb.debian.org/debian buster InRelease [122 kB]                                                                                                                                                                                                                                                         
0.570 Get:2 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB]                                                                                                                                                                                                                                       
0.634 Get:3 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]                                                                                                                                                                                                                                                
0.700 Get:4 http://deb.debian.org/debian buster/main arm64 Packages [7737 kB]                                                                                                                                                                                                                                              
2.577 Get:5 http://deb.debian.org/debian-security buster/updates/main arm64 Packages [576 kB]
2.646 Get:6 http://deb.debian.org/debian buster-updates/main arm64 Packages [8780 B]
3.620 Fetched 8535 kB in 3s (2464 kB/s)
3.620 Reading package lists...
4.384 yarn install v1.22.19
4.497 [1/4] Resolving packages...
5.059 [2/4] Fetching packages...
63.37 [3/4] Linking dependencies...
63.37 warning " > @testing-library/user-event@14.4.3" has unmet peer dependency "@testing-library/dom@>=7.21.4".
63.37 warning " > chrome-aws-lambda@10.1.0" has incorrect peer dependency "puppeteer-core@^10.1.0".
63.38 warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".
63.38 warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".
63.39 warning " > react-simple-maps@3.0.0" has unmet peer dependency "prop-types@^15.7.2".
63.39 warning " > recharts@2.7.3" has unmet peer dependency "prop-types@^15.6.0".
63.39 warning "recharts > react-smooth@2.0.3" has unmet peer dependency "prop-types@^15.6.0".
63.39 warning " > serverless-domain-manager@7.1.1" has unmet peer dependency "serverless@^2.60 || ^3.0.0".
63.39 warning " > serverless-offline@12.0.4" has unmet peer dependency "serverless@^3.2.0".
63.39 warning " > serverless-webpack@5.13.0" has unmet peer dependency "serverless@1 || 2 || 3".
74.05 [4/4] Building fresh packages...
75.14 warning Error running install script for optional dependency: "/app/node_modules/unix-dgram: Command failed.
75.14 Exit code: 1
75.14 Command: node-gyp rebuild
75.14 Arguments: 
75.14 Directory: /app/node_modules/unix-dgram
75.14 Output:
75.14 gyp info it worked if it ends with ok
75.14 gyp info using node-gyp@9.1.0
75.14 gyp info using node@16.20.2 | linux | arm64
75.14 gyp ERR! find Python 
75.14 gyp ERR! find Python Python is not set from command line or npm configuration
75.14 gyp ERR! find Python Python is not set from environment variable PYTHON
75.14 gyp ERR! find Python checking if \"python3\" can be used
75.14 gyp ERR! find Python - \"python3\" is not in PATH or produced an error
75.14 gyp ERR! find Python checking if \"python\" can be used
75.14 gyp ERR! find Python - \"python\" is not in PATH or produced an error
75.14 gyp ERR! find Python 
75.14 gyp ERR! find Python **********************************************************
75.14 gyp ERR! find Python You need to install the latest version of Python.
75.14 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
75.14 gyp ERR! find Python you can try one of the following options:
75.14 gyp ERR! find Python - Use the switch --python=\"/path/to/pythonexecutable\"
75.14 gyp ERR! find Python   (accepted by both node-gyp and npm)
75.14 gyp ERR! find Python - Set the environment variable PYTHON
75.14 gyp ERR! find Python - Set the npm configuration variable python:
75.14 gyp ERR! find Python   npm config set python \"/path/to/pythonexecutable\"
75.14 gyp ERR! find Python For more information consult the documentation at:
75.14 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
75.14 gyp ERR! find Python **********************************************************
75.14 gyp ERR! find Python 
75.14 gyp ERR! configure error 
75.14 gyp ERR! stack Error: Could not find any Python installation to use
75.14 gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
75.14 gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
75.14 gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
75.14 gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
75.14 gyp ERR! stack     at exithandler (node:child_process:410:5)
75.14 gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:422:5)
75.14 gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
75.14 gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
75.14 gyp ERR! stack     at onErrorNT (node:internal/child_process:485:16)
75.14 gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
75.14 gyp ERR! System Linux 6.6.12-linuxkit
75.14 gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
75.14 gyp ERR! cwd /app/node_modules/unix-dgram
75.14 gyp ERR! node -v v16.20.2
75.14 gyp ERR! node-gyp -v v9.1.0
75.14 gyp ERR! not ok"
75.14 info This module is OPTIONAL, you can safely ignore this error
76.06 error /app/node_modules/wappalyzer/node_modules/puppeteer: Command failed.
76.06 Exit code: 1
76.06 Command: node install.js
76.06 Arguments: 
76.06 Directory: /app/node_modules/wappalyzer/node_modules/puppeteer
76.06 Output:
76.06 The chromium binary is not available for arm64.
76.06 If you are on Ubuntu, you can install with: 
76.06 
76.06  sudo apt install chromium
76.06 
76.06 
76.06  sudo apt install chromium-browser
76.06 
76.06 ERROR: Failed to set up Chromium r1095492! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
76.06 Error
76.06     at handleArm64 (/app/node_modules/wappalyzer/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js:137:11)
76.06     at BrowserFetcher.download (/app/node_modules/wappalyzer/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js:284:13)
76.06     at fetchBinary (/app/node_modules/wappalyzer/node_modules/puppeteer/lib/cjs/puppeteer/node/install.js:112:14)
76.06     at downloadBrowser (/app/node_modules/wappalyzer/node_modules/puppeteer/lib/cjs/puppeteer/node/install.js:61:11)
76.06     at Object.<anonymous> (/app/node_modules/wappalyzer/node_modules/puppeteer/install.js:40:3)
76.06     at Module._compile (node:internal/modules/cjs/loader:1198:14)
76.06     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
76.06     at Module.load (node:internal/modules/cjs/loader:1076:32)
76.06     at Function.Module._load (node:internal/modules/cjs/loader:911:12)
76.06     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
76.06 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
Dockerfile:8
--------------------
   7 |     
   8 | >>> RUN apt-get update && \
   9 | >>>     yarn install --production && \
  10 | >>>     rm -rf /app/node_modules/.cache
  11 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update &&     yarn install --production &&     rm -rf /app/node_modules/.cache" did not complete successfully: exit code: 1
ollieanwyll commented 4 months ago

Tried making some tweaks to the Dockerfile, but not luck. Will be looking out for an ARM build!

eshbeata commented 4 months ago

Just do the following :

Works on Apple M1

docker build --platform linux/amd64 -t web-check .

ill create PR with docker-compose option better than managing direct docker file.

thanks

ChrisCarini commented 4 months ago

I just opened https://github.com/Lissy93/web-check/pull/91 which should address this - there were a few other hurdles here. See PR for details. @Lissy93 , I also incorporated the changes from #55 to fix. Please review when you have a moment!

ncarvajalc commented 4 months ago

Just do the following :

Works on Apple M1

docker build --platform linux/amd64 -t web-check .

ill create PR with docker-compose option better than managing direct docker file.

thanks

Thanks a lot. Worked for me