DEV Community

Discussion on: node-gyp support in alpine linux

Collapse
 
bennycode profile image
Benny Code

When executing "RUN apk add --no-cache python make g++" then I am running into error "unable to select packages: python (no such package): required by: world[python]". I am using Docker image "node:16-alpine".

Collapse
 
ssianik profile image
Syed Sirajul Islam Anik

I used python2 as I saw it was explicitly looking for python2

Collapse
 
ikeapawel profile image
ikeapawel

Use python3 instead.

Collapse
 
magoacademico profile image
Mago Acadêmico

Have you found the solution?

Collapse
 
magoacademico profile image
Mago Acadêmico

I found the solution. If you want exactly python2, you need to use the alpine version 3.15. The latest versions only supports python3. So basically change "node:16-alpine" to "node:16-alpine3.15"