Home > database >  Any potential fixes for an executor failed running [/bin/sh -c apk add --no-cache python g make]:
Any potential fixes for an executor failed running [/bin/sh -c apk add --no-cache python g make]:

Time:11-10

I am running through the Docker setup tutorial located at: https://docs.docker.com/get-started/02_our_app/

When running the docker file containing the code:

# syntax=docker/dockerfile:1
FROM node:12-alpine
RUN apk add --no-cache python g   make
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]

I get the following error message:

=> ERROR [2/5] RUN apk add --no-cache python g   make
------                                              
#9 0.514 fetch https://dlcdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
#9 3.656 fetch https://dlcdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
#9 5.174 ERROR: unable to select packages:
#9 5.218   python (no such package):
#9 5.218     required by: world[python]
------
executor failed running [/bin/sh -c apk add --no-cache python g   make]: exit code: 1

Any ideas on what this error could be? I tried searching around, but found nothing that seems like it would be helpful. Thank you all for your time and I would greatly appreciate any help.

CodePudding user response:

Try using a different image that already has python, so

FROM python:3-alpine

You can also try to replace the apk add command with

RUN apk add --update --no-cache python3 g   make
  • Related