简体   繁体   中英

Issue when Dockerize Meteor app with geoffreybooth/meteor-base

I'm new to Docker.

I'm trying to dockerize an existing meteor app with https://hub.docker.com/r/geoffreybooth/meteor-base

I get an error on step 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"]

Not sure if failure is because of

gyp ERR! find Python

or

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

However the file build-meteor-npm-dependencies.sh is in the correct folder.

TIA.

I just went on with the default setup and it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM