Files
um-react/Dockerfile
T
鲁树人 b142c1ba34 chore: dep pkg upgrade
- Updated Node version in Dockerfile and .npmrc.
- Upgraded various dependencies in package.json, including react-dropzone, react-router, and eslint.
- Added pnpm-workspace.yaml for workspace management.
- Adjusted TypeScript configurations and test utilities for compatibility.
- Enhanced documentation for installation instructions and TypeScript toolchain.
2026-10-21 10:51:06 +09:00

26 lines
566 B
Docker

FROM node:24.22.0-slim AS build
ENV PNPM_HOME="/p"
ENV PATH="$PNPM_HOME:$PATH"
WORKDIR /app
RUN corepack enable pnpm \
&& apt-get update \
&& apt-get install -y --no-install-recommends git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
RUN pnpm exec true
COPY . .
RUN pnpm install --frozen-lockfile
ARG GIT_COMMIT=
ARG GIT_COMMIT_FULL=
RUN pnpm build
FROM caddy:latest
COPY --from=build /app/dist /srv/um-react
EXPOSE 80
CMD ["caddy", "file-server", "--root", "/srv/um-react"]