error of 'Containerize an application'

Ouverte
#326 13 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
32/100
Type d'issue
Bug
Clarté
À clarifier
Activité
À l'abandon
Stack technique
docker, node.js, python, sqlite
Domaine
build-system, devops

Piste de recherche

Start by reproducing the Containerize an application tutorial and the yarn install --production step shown in the report. Inspect the sqlite3 node-gyp failure, including the missing Python installation and failed pre-built binary download. Done means the tutorial's container build completes successfully.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

As a beginner of docker,I followed the tutorials on the official website and found that there was a mistake which i could not solve by myself.please teach me how to solve this prolem,thank you .
The following is the error report.

=> ERROR [4/4] RUN yarn install --production 225.4s

[4/4] RUN yarn install --production:
#9 0.564 yarn install v1.22.19
#9 0.646 [1/4] Resolving packages...
#9 0.886 [2/4] Fetching packages...
#9 223.7 [3/4] Linking dependencies...
#9 224.7 [4/4] Building fresh packages...
#9 225.3 error /app/node_modules/sqlite3: Command failed.
#9 225.3 Exit code: 1
#9 225.3 Command: node-pre-gyp install --fallback-to-build
#9 225.3 Arguments:
#9 225.3 Directory: /app/node_modules/sqlite3
#9 225.3 Output:
#9 225.3 node-pre-gyp info it worked if it ends with ok
#9 225.3 node-pre-gyp info using [email protected]
#9 225.3 node-pre-gyp info using [email protected] | linux | x64
#9 225.3 node-pre-gyp info check checked for "/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node" (not found)
#9 225.3 node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz
#9 225.3 node-pre-gyp ERR! install request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz failed, reason: connect ECONNREFUSED 127.0.0.1:443
#9 225.3 node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v108 ABI, musl) (falling back to source compile with node-gyp)
#9 225.3 node-pre-gyp WARN Hit error request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-musl-x64.tar.gz failed, reason: connect ECONNREFUSED 127.0.0.1:443
#9 225.3 gyp info it worked if it ends with ok
#9 225.3 gyp info using [email protected]
#9 225.3 gyp info using [email protected] | linux | x64
#9 225.3 gyp info ok
#9 225.3 gyp info it worked if it ends with ok
#9 225.3 gyp info using [email protected]
#9 225.3 gyp info using [email protected] | linux | x64
#9 225.3 gyp ERR! find Python
#9 225.3 gyp ERR! find Python Python is not set from command line or npm configuration
#9 225.3 gyp ERR! find Python Python is not set from environment variable PYTHON
#9 225.3 gyp ERR! find Python checking if "python3" can be used
#9 225.3 gyp ERR! find Python - "python3" is not in PATH or produced an error
#9 225.3 gyp ERR! find Python checking if "python" can be used
#9 225.3 gyp ERR! find Python - "python" is not in PATH or produced an error
#9 225.3 gyp ERR! find Python
#9 225.3 gyp ERR! find Python **********************************************************
#9 225.3 gyp ERR! find Python You need to install the latest version of Python.
#9 225.3 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#9 225.3 gyp ERR! find Python you can try one of the following options:
#9 225.3 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#9 225.3 gyp ERR! find Python (accepted by both node-gyp and npm)
#9 225.3 gyp ERR! find Python - Set the environment variable PYTHON
#9 225.3 gyp ERR! find Python - Set the npm configuration variable python:
#9 225.3 gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
#9 225.3 gyp ERR! find Python For more information consult the documentation at:
#9 225.3 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#9 225.3 gyp ERR! find Python **********************************************************
#9 225.3 gyp ERR! find Python
#9 225.3 gyp ERR! configure error
#9 225.3 gyp ERR! stack Error: Could not find any Python installation to use
#9 225.3 gyp ERR! stack at PythonFinder.fail (/app/node_modules/node-gyp/lib/find-python.js:330:47)
#9 225.3 gyp ERR! stack at PythonFinder.runChecks (/app/node_modules/node-gyp/lib/find-python.js:159:21)
#9 225.3 gyp ERR! stack at PythonFinder. (/app/node_modules/node-gyp/lib/find-python.js:202:16)
#9 225.3 gyp ERR! stack at PythonFinder.execFileCallback (/app/node_modules/node-gyp/lib/find-python.js:294:16)
#9 225.3 gyp ERR! stack at exithandler (node:child_process:420:5)
#9 225.3 gyp ERR! stack at ChildProcess.errorhandler (node:child_process:432:5)
#9 225.3 gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#9 225.3 gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)
#9 225.3 gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)
#9 225.3 gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
#9 225.3 gyp ERR! System Linux 5.10.102.1-microsoft-standard-WSL2
#9 225.3 gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
#9 225.3 gyp ERR! cwd /app/node_modules/sqlite3
#9 225.3 gyp ERR! node -v v18.12.1
#9 225.3 gyp ERR! node-gyp -v v8.4.1
#9 225.3 gyp ERR! not ok
#9 225.3 node-pre-gyp ERR! build error
#9 225.3 node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
#9 225.3 node-pre-gyp ERR! stack at ChildProcess. (/app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
#9 225.3 node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#9 225.3 node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
#9 225.3 node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
#9 225.3 node-pre-gyp ERR! System Linux 5.10.102.1-microsoft-standard-WSL2
#9 225.3 node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#9 225.3 node-pre-gyp ERR! cwd /app/node_modules/sqlite3
#9 225.3 node-pre-gyp ERR! node -v v18.12.1
#9 225.3 node-pre-gyp ERR! node-pre-gyp -v v1.0.10
#9 225.3 node-pre-gyp ERR! not ok
#9 225.3 Failed to execute '/usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/app/node_modules/sqlite3/lib/binding/napi-v6-linux-musl-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
#9 225.3 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


executor failed running [/bin/sh -c yarn install --production]: exit code: 1

Langage dominant
JavaScript
Étoiles
3.1k
Forks
6.3k
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

  • Fournit un Dockerfile ou un fichier Docker Compose
  • Aucun modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de docker/getting-started

Toutes les issues de docker/getting-started

Issues similaires

Plus d'issues JavaScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.