Open mickaelperrin opened 8 years ago
In alpine linux container, just do like bellow and you have it:
RUN wget https://github.com/emcrisostomo/fswatch/releases/download/1.17.1/fswatch-1.17.1.tar.gz \
&& tar -xzvf fswatch-1.17.1.tar.gz \
&& cd fswatch-1.17.1 \
&& ./configure \
&& make \
&& make install
I was trying this together with pest watch, but I ran into an issue that in my Docker container I was getting flooded with Inotify events even when nothing changed. Couldn't quickly find any info on how to use environment or something to force a monitor to poll so I tricked it by removing the inotify header in a build container.
This is what I'm using now, and that way I just only have the poll monitor but that is fast enough and not continually rerunning my tests when nothing changes.
FROM alpine:latest AS fswatch
RUN apk add --no-cache autoconf alpine-sdk
RUN rm /usr/include/sys/inotify.h
RUN wget https://github.com/emcrisostomo/fswatch/releases/download/1.17.1/fswatch-1.17.1.tar.gz \
&& tar -xzvf fswatch-1.17.1.tar.gz \
&& cd fswatch-1.17.1 \
&& ./configure \
&& make \
&& make install \
&& rm -rf /fswatch-1.17.1
FROM alpine:latest
COPY --from=fswatch /usr/local/bin/fswatch /usr/local/bin/fswatch
COPY --from=fswatch /usr/local/lib/libfswatch.so* /usr/local/lib/
Hi,
That would be great if there was a
fswatch
package available for alpine linux.That would be so useful when using in docker containers to reduce drastically the image size by removing all not required
build
tools.Thanks