alpine-python icon indicating copy to clipboard operation
alpine-python copied to clipboard

PYTHON not found in PATH - build 3.8

Open srameshr opened this issue 4 years ago • 1 comments

Here is my docker file:

FROM jfloff/alpine-python:3.8-onbuild
  
# Build stage
FROM node:lts-alpine as build

RUN apk update; \
  apk add git;
WORKDIR /tmp
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

# Release stage
FROM node:lts-alpine as release

RUN apk update; \
  apk add git;

VOLUME /parse-server/cloud /parse-server/config

WORKDIR /parse-server

COPY package*.json ./

RUN npm ci --production --ignore-scripts

COPY bin bin
COPY public_html public_html
COPY views views
COPY --from=build /tmp/lib lib
RUN mkdir -p logs && chown -R node: logs

ENV PORT=80
USER node
EXPOSE $PORT

ENTRYPOINT ["node", "./bin/parse-server"]

docker build throws a path error. PYTHON, PYTHON2, PYTHON3 not found in path

I have copied the entrypoint.sh in the same dir and my requirements.txt is empty as I dont have any package dependencies. 

srameshr avatar Apr 06 '20 06:04 srameshr

Your problem is here: FROM node:lts-alpine as release this won't have the alpine-python overlays in the final image.

I notice you're using the "onbuild" image at the top, but don't have any ONBUILD calls in your multi-stage Dockerfile.

I think if you remove that top line and replace this FROM node:lts-alpine as release with FROM jfloff/alpine-python:3.8 as release you might get the desired effect?

tsal avatar Nov 10 '20 14:11 tsal