需要在 docker 镜像中增加观察者,因为它在 expo 发布时失败并出现错误
[11:39:08] Error: ENOSPC: System limit for number of file watchers reached, watch '/__w/mevris-client-app-products/mevris-client-app-products/node_modules/update-notifier/node_modules/camelcase'
[11:39:08] at FSWatcher.start (internal/fs/watchers.js:165:26)
[11:39:08] at Object.watch (fs.js:1258:11)
[11:39:08] at NodeWatcher.watchdir (/__w/mevris-client-app-products/mevris-client-app-products/node_modules/metro/node_modules/sane/src/node_watcher.js:159:22)
[11:39:08] at Walker.<anonymous> (/__w/mevris-client-app-products/mevris-client-app-products/node_modules/metro/node_modules/sane/src/common.js:109:31)
[11:39:08] at Walker.emit (events.js:198:13)
[11:39:08] at /__w/mevris-client-app-products/mevris-client-app-products/node_modules/walker/lib/walker.js:69:16
[11:39:08] at go$readdir$cb (/__w/mevris-client-app-products/mevris-client-app-products/node_modules/@react-native-community/cli/node_modules/graceful-fs/graceful-fs.js:187:14)
[11:39:08] at FSReqWrap.args [as oncomplete] (fs.js:140:20)
Run Code Online (Sandbox Code Playgroud)
在 Dockerfile 中添加了以下几行
RUN echo "fs.inotify.max_user_instances=524288" >> /etc/sysctl.conf && sysctl -p
Run Code Online (Sandbox Code Playgroud)
构建时导致此错误
sysctl: setting key "fs.inotify.max_user_watches": Read-only file system
我需要在 Github Actions 中使用那个 docker 镜像
文件
FROM node:10
RUN …
Run Code Online (Sandbox Code Playgroud) 这是我的 Dockerfile
FROM node:10
RUN apt-get -qq update && apt-get -qq -y install bzip2
RUN yarn global add @bluebase/cli && bluebase plugins:add @bluebase/cli-expo && bluebase plugins:add @bluebase/cli-web
RUN bluebase plugins
Run Code Online (Sandbox Code Playgroud)
构建 docker 文件后,它会安装所有依赖项,最后一个命令会RUN bluebase plugins
输出已安装的插件列表。但是当这个图像被推送并在 github 操作bluebase
中使用时,全局可用但没有安装插件。我究竟做错了什么?
Github 工作流程
name: Development CI
on:
push:
# Sequence of patterns matched against refs/heads
branches:
- '*' # Push events on all branchs
- '*/*'
- '!master' # Exclude master
- '!next' # Exclude next
- '!alpha' # Exclude …
Run Code Online (Sandbox Code Playgroud) continuous-integration continuous-deployment docker dockerfile github-actions