Files
site-documentation/Dockerfile
Alex Lebens 9b03c4e6d5
All checks were successful
release-image / guarddog (push) Successful in 19s
release-image / build (push) Successful in 30s
release-image / semantic-release (push) Successful in 16s
release-image / release-harbor (push) Has been skipped
release-image / release-gitea (push) Has been skipped
renovate / renovate (push) Successful in 23s
Release (#195)
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net>
Reviewed-on: #195
2026-03-22 23:40:02 +00:00

36 lines
810 B
Docker

ARG REGISTRY=dhi.io
FROM ${REGISTRY}/bun:1.3.11-alpine3.22-dev AS builder
WORKDIR /app
COPY package.json bun.lock ./
FROM builder AS prod-deps
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
bun install --production --frozen-lockfile
FROM builder AS build-deps
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
bun install --frozen-lockfile
FROM build-deps AS build
COPY . .
RUN bun run build
FROM ${REGISTRY}/bun:1.3.11-alpine3.22 AS runtime
WORKDIR /app
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
ARG APP_VERSION=latest
ARG APP_VERSION
ENV HOST=0.0.0.0
ENV PORT=4321
LABEL version=$APP_VERSION
LABEL description="Astro based documentation website"
EXPOSE $PORT
CMD ["bun", "run", "./dist/server/entry.mjs"]