Reputation: 11
I'm trying to setup Github Actions to build a docker package and I'm running into this error:
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 }
Workflow step:
- 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
I'm using latest stable Node.JS, node-sass, and node-gyp versions. Any help would really be appreciated as I've been crawling the web for a while now trying to figure it out. If you need any more info, let me know.
Upvotes: 0
Views: 468
Reputation: 408
Try adding this to your DockerFile:
RUN apt-get update && apt-get install python
Upvotes: 1