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

532 views Asked by At

Hi I'm working with ember-cli application on Docker image. When I run ember application using

 ember server

I'm getting the following message

version: 0.2.6
0.2.7

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

I've tried in Dockerfile

#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

It appears to have installed correctly..but I'm still getting the message saying it can't find 'watchman'

What am I missing?

Also, I tried the following as per 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

Then I'm getting a warning..and throwing the following error

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

Have you guys come across this before? how can I get this fixed..any pointers would be awesome.

1

There are 1 answers

0
Abdullah Jibaly On BEST ANSWER

It looks like the current build of watchman is failing, I tried the latest stable one and it seems to work with your steps above. Just grab v3.1 and it should work:

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