# Lint-only image, built by script/lint when it is not already inside a # container. Linting is a build step, so a successful build is a clean # lint, and nothing is bind-mounted, which matters when the daemon is # remote. # # node 22-alpine, 2026-02-22 FROM node@sha256:e4bf2a82ad0a4037d28035ae71529873c069b13eb0455466ae0bc13363826e34 WORKDIR /app # Makes script/lint run the linter directly instead of recursing into # another docker build, which has no daemon here. ENV LINT_IN_CONTAINER=1 COPY script/ script/ COPY package.json yarn.lock ./ RUN script/bootstrap COPY . . # ARG sits after the dependency layer so that layer stays cached and # only the lint re-runs. The guard fails a bare `docker build # -f Dockerfile.lint .`, which would otherwise reuse the empty (stable) # cache key and report a lint it never ran. ARG CHECK_EPOCH RUN [ -n "$CHECK_EPOCH" ] || exit 1 RUN echo "lint epoch: ${CHECK_EPOCH}" && make lint