Я пытаюсь докеризировать этот репозиторий , чтобы я мог запустить его на своем локальном сервере.
Я создал этот 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, я получаю эту ошибку:
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.