使用 ember-cli 在 phusion/baseimage Docker 图像上找不到守望者

watchman not found on phusion/baseimage Docker image with ember-cli

您好,我正在 Docker 图像上使用 ember-cli 应用程序。当我 运行 ember 应用程序使用

 ember server

我收到以下消息

version: 0.2.6
0.2.7

"Could not find watchman, falling back to NodeWatcher for file system  events."

我在Docker文件

中尝试过
#install homebrew
RUN git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew

ENV PATH="$HOME/.linuxbrew/bin:$HOME/local/m4/bin:$PATH"
ENV MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
ENV INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"

RUN brew install watchman

它似乎安装正确..但我仍然收到消息说找不到 'watchman'

我错过了什么?

此外,我根据 installing watchman

尝试了以下操作
RUN apt-get install -y automake
RUN cd /tmp \
 git clone https://github.com/facebook/watchman.git \
 cd watchman \
 ./autogen.sh \
 ./configure \
 make \
 make install

然后我收到警告..并抛出以下错误

log.c: In function 'w_set_thread_name':
log.c:47:12: error: ignoring return value of 'vasprintf', declared with        attribute warn_unused_result [-Werror=unused-result]
vasprintf(&name, fmt, ap);
        ^
cc1: all warnings being treated as errors
make[1]: *** [watchman-log.o] Error 1
make: *** [all] Error 2

你们以前遇到过这个吗?我怎样才能解决这个问题..任何指针都会很棒。

看起来当前的 watchman 构建失败了,我尝试了最新的稳定版本,它似乎可以按照您上面的步骤工作。只需获取 v3.1,它应该可以工作:

RUN git clone https://github.com/facebook/watchman.git \
    && cd watchman \
    && git checkout v3.1 \
    && ./autogen.sh \
    && ./configure \
    && make \
    && make install