Files
site-documentation/Dockerfile
Alex Lebens 774eb707a3
All checks were successful
release-image / build (push) Successful in 31s
release-image / guarddog (push) Successful in 1m2s
release-image / semantic-release (push) Successful in 28s
release-image / release-harbor (push) Has been skipped
release-image / release-gitea (push) Has been skipped
Release (#188)
Reviewed-on: #188
2026-03-12 21:25:55 +00:00

36 lines
810 B
Docker

ARG REGISTRY=dhi.io
FROM ${REGISTRY}/bun:1.3.10-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.10-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"]