Files
site-profile/Dockerfile
Alex Lebens 62066c6f3b
Some checks failed
test-build / guarddog (push) Successful in 2m20s
test-build / build (push) Successful in 3m20s
renovate / renovate (push) Successful in 9m38s
release-image-gitea / build (push) Successful in 15m42s
release-image-gitea / release (push) Failing after 29s
release-image-harbor / build (push) Successful in 11m25s
release-image-harbor / release (push) Failing after 13m15s
feat: release 2.18.1
2026-03-02 22:21:18 -06:00

33 lines
752 B
Docker

FROM docker.io/node:24.14.0-alpine AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
FROM builder AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
FROM prod-deps AS build-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
FROM build-deps AS build
COPY . .
RUN pnpm run build
FROM dhi.io/node:24.14.0 AS runtime
WORKDIR /app
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
LABEL version="2.18.1"
LABEL description="Astro based personal website"
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE $PORT
CMD ["node", "./dist/server/entry.mjs"]