第一次尝试对github存储库进行docker化-我做错了什么?

时间:2018-10-23 18:36:24

标签: node.js docker github dockerfile

我正在尝试对this repository进行docker化,以便可以在本地服务器上运行它。

我已经创建了这个Dockerfile:

FROM node:8.12-alpine

ENV APP_HOME /app
RUN mkdir -pv $APP_HOME
WORKDIR $APP_HOME

ADD . $APP_HOME

ENV NODE_ENV production
ENV NPM_CONFIG_LOGLEVEL warn
EXPOSE 80

RUN yarn install
CMD yarn start

它看起来还可以,但是我确实收到了一些警告:

Step 9/10 : RUN yarn install
 ---> Running in 6b1b227afaa9
yarn install v1.9.4
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "antd > rc-editor-mention@1.1.6" has unmet peer dependency "immutable@^3.7.4".
warning " > react-apollo@2.1.6" has unmet peer dependency "apollo-client@^2.2.3".
warning " > eslint-config-prettier@2.9.0" has unmet peer dependency "eslint@>=3.14.1".
warning "react-app-rewire-less > less-loader@4.1.0" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
[4/4] Building fresh packages...
Done in 80.50s.

但是,当我执行docker run命令时,出现此错误:

yarn run v1.9.4
$ NODE_PATH=src:src/components:src/containers:src/helpers react-app-rewired start
/bin/sh: react-app-rewired: not found
error Command failed with exit code 127.

0 个答案:

没有答案