-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (28 loc) · 887 Bytes
/
Dockerfile
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
31
32
33
34
35
# Build environment
FROM debian:bookworm-slim AS build
# mise configuration
ENV MISE_VERSION="v2025.1.9"
ENV MISE_DATA_DIR="/mise"
ENV MISE_CONFIG_DIR="/mise"
ENV MISE_CACHE_DIR="/mise/cache"
ENV MISE_INSTALL_PATH="/usr/local/bin/mise"
ENV PATH="/mise/shims:$PATH"
# pnpm configuration
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
WORKDIR /app
# Setup mise
RUN apt-get update && apt-get -y --no-install-recommends install curl ca-certificates
RUN curl https://mise.run | sh
# Use mise to set up local environment tools
COPY mise.toml .
RUN mise trust && mise install
# Primary application build
COPY . .
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build
# Runtime static server
# https://github.com/lipanski/docker-static-website
FROM lipanski/docker-static-website:2.4.0 AS runtime
COPY --from=build /app/dist .
EXPOSE 3000