-
Notifications
You must be signed in to change notification settings - Fork 153
/
Dockerfile.dev
30 lines (25 loc) · 1004 Bytes
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:18.15.0-bullseye-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
bash \
build-essential \
git \
unzip \
wget
ENV WATCHMAN_VERSION=v2024.02.05.00
# Watchman is required to run relay --watch
# Pre-built binaries can be found at https://github.com/facebook/watchman/releases
RUN wget -qO watchman.zip "https://github.com/facebook/watchman/releases/download/${WATCHMAN_VERSION}/watchman-${WATCHMAN_VERSION}-linux.zip"
RUN unzip watchman.zip
RUN cd watchman-${WATCHMAN_VERSION}-linux && \
mkdir -p /usr/local/bin /usr/local/lib /usr/local/var/run/watchman && \
cp bin/* /usr/local/bin && \
cp lib/* /usr/local/lib && \
chmod 755 /usr/local/bin/watchman && \
chmod 2777 /usr/local/var/run/watchman && \
cd .. && \
rm -rf watchman.zip watchman-${WATCHMAN_VERSION}-linux
COPY package.json yarn.lock /app/
RUN --mount=type=cache,id=yarndev,target=/usr/local/share/.cache \
yarn install --frozen-lockfile --quiet