Skip to content

Instantly share code, notes, and snippets.

@MrTortoise
Forked from ivan-loh/install-watchman.sh
Last active June 15, 2017 23:03
Show Gist options
  • Save MrTortoise/02250fd915ff39e1185f71f246b3a00d to your computer and use it in GitHub Desktop.
Save MrTortoise/02250fd915ff39e1185f71f246b3a00d to your computer and use it in GitHub Desktop.
Watchman installation for Ubuntu 16.04
# checkout, compile & install
git clone https://github.com/facebook/watchman.git
cd watchman/
git checkout v4.7.0
sudo apt-get install -y autoconf automake build-essential python-dev libtool
./autogen.sh
./configure
make
sudo make install
# raise inotify limit
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches && \
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events && \
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances && \
watchman shutdown-server
@rosskevin
Copy link

Thanks! git clone and checkout can be done in one shot with minimal depth.

Here's my docker command based on yours:

ENV WATCHMAN_VERSION v4.7.0

RUN cd /tmp \
    && git clone --branch $WATCHMAN_VERSION --depth 1 https://github.com/facebook/watchman.git \
    && cd watchman \
    && ./autogen.sh \
    && ./configure --enable-statedir=/tmp \
    && make \
    && make install \
    && rm -rf /tmp/watchman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment