jemacchi / docker-watchman

Pre-built facebook/watchman for use in Alpine & Debian based Docker images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Facebook's Watchman for Docker Containers

Watchman is a file watching service developed by Facebook, and it's used by many projects (like Ember CLI) to watch files for changes, triggering project rebuilds whenever a change is detected.

Instead of figuring out how to build watchman from source - or waiting for long compilation times when building your Dockerfiles - you can use the "Multi-stage Dockerfile" feature to copy the watchman executable directly from our image!

Supported tags and respective Dockerfile links

Recommended usage on Alpine-based images:

# Start from whatever image you are using - this is a node app example:
FROM node:8-alpine

# Install the packages required for watchman to work properly:
RUN apk add --no-cache libcrypto1.0 libgcc libstdc++

# Copy the watchman executable binary directly from our image:
COPY --from=icalialabs/watchman:4-alpine3.4 /usr/local/bin/watchman* /usr/local/bin/

# Create the watchman STATEDIR directory:
RUN mkdir -p /usr/local/var/run/watchman \
 && touch /usr/local/var/run/watchman/.not-empty

# (Optional) Copy the compiled watchman documentation:
COPY --from=icalialabs/watchman:4-alpine3.4 /usr/local/share/doc/watchman* /usr/local/share/doc/

# Continue with the rest of your Dockerfile...

References

Similar projects:

About

Pre-built facebook/watchman for use in Alpine & Debian based Docker images


Languages

Language:Dockerfile 100.0%