【发布时间】:2020-09-02 04:25:45
【问题描述】:
我是 Docker 新手。
我正在尝试使用 https://hub.docker.com/r/geoffreybooth/meteor-base 对接现有的流星应用程序
第 12 步出现错误:
Step 12/14 : RUN bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh
---> Running in 82265ff01645
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
...
ERROR: Service 'app' failed to build: The command '/bin/sh -c bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh' returned a non-zero code: 1
Dockerfile:
FROM geoffreybooth/meteor-base:1.8.3
COPY ./app/package*.json $APP_SOURCE_FOLDER/
RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh
COPY ./app $APP_SOURCE_FOLDER/
RUN bash $SCRIPTS_FOLDER/build-meteor-bundle.sh
FROM node:13.6.0-alpine
ENV APP_BUNDLE_FOLDER /opt/bundle
ENV SCRIPTS_FOLDER /docker
RUN apk --no-cache add \
bash \
ca-certificates
COPY --from=0 $SCRIPTS_FOLDER $SCRIPTS_FOLDER/
COPY --from=0 $APP_BUNDLE_FOLDER/bundle $APP_BUNDLE_FOLDER/bundle/
# step 12 which fails
RUN bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh
ENTRYPOINT ["/docker/entrypoint.sh"]
CMD ["node", "main.js"]
不知道是不是因为失败
gyp ERR! find Python
或
ERROR: Service 'app' failed to build: The command '/bin/sh -c bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh' returned a non-zero code: 1
但是文件 build-meteor-npm-dependencies.sh 位于正确的文件夹中。
TIA。
【问题讨论】: