繁体   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