簡體   English   中英

Github 將 docker 部署到 package 的操作 | 錯誤:未找到:python

[英]Github Actions deploying docker to package | Error: not found: python

我正在嘗試設置 Github 操作來構建 docker package 並且我遇到了這個錯誤:

gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/usr/src/app/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/src/app/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/src/app/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/src/app/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/src/app/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /usr/src/app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:194:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/usr/src/app/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/src/app/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/src/app/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/src/app/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/src/app/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /usr/src/app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:194:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/usr/src/app/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/src/app/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/src/app/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/src/app/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/src/app/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /usr/src/app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:194:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (/usr/src/app/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/src/app/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/src/app/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/src/app/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/src/app/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /usr/src/app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:194:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }

工作流程步驟:

    - name: Publish to Github Packages Registry
      uses: elgohr/Publish-Docker-Github-Action@master
      with:
        name: SimpleAdminTeam/Website-Client/src
        registry: docker.pkg.github.com
        username: ${{ secrets.USERNAME }}
        password: ${{ secrets.GITHUB_TOKEN }}
        dockerfile: Dockerfile-prod
        tags: latest

我正在使用最新的穩定 Node.JS、node-sass 和 node-gyp 版本。 任何幫助都將不勝感激,因為我一直在爬 web 一段時間,現在試圖弄清楚。 如果您需要更多信息,請告訴我。

嘗試將此添加到您的 DockerFile 中:

RUN apt-get update && apt-get install python

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM