react-spring Docker & Self-Hosted Deployment

GitHub

๏ธ A spring physics based React animation library

29,138 stars TypeScript TypeScript 1 file ยท ~13,169 tokens #animation-library#react#react-spring#spring-physics#springs
1. Pull Image (DOCKERHUB) docker pull pmndrs/react-spring:latest
2. Docker Run (1-Click Launch) docker run -d --name react-spring -p 8080:8080 --restart always pmndrs/react-spring:latest
3. Podman Run podman run -d --name react-spring -p 8080:8080 --restart always pmndrs/react-spring:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/pmndrs/react-spring:latest
5. ORAS Pull (OCI Artifact) oras pull pmndrs/react-spring:latest
Dockerfile
# syntax=docker/dockerfile:1.28

# ----- Build stage: install + build inside the full monorepo -----
FROM node:24.22.0-alpine AS builder

RUN corepack enable
WORKDIR /repo

COPY . .

RUN pnpm install --frozen-lockfile

# Build the docs and any workspace packages it depends on
RUN pnpm --filter @react-spring/docs... build

# Produce a self-contained dir with prod-only deps (symlinks dereferenced)
RUN pnpm --filter @react-spring/docs deploy --prod /out

# pnpm deploy doesn't carry over the build output; copy it in explicitly
RUN cp -r /repo/docs/build /out/build

# ----- Runtime stage: slim image with only what's needed to serve -----
FROM node:24.22.0-alpine

WORKDIR /app
ENV NODE_ENV=production
ENV PORT=8080

COPY --from=builder /out ./

EXPOSE 8080
CMD ["node_modules/.bin/react-router-serve", "./build/server/index.js"]