# The main purpose of this Dockerfile is to install the `pnpm` package manager in the official Node.js image
# and use an init script as the entrypoint of a custom image to build and run the documentation site.
FROM node:lts-slim@sha256:3638d9a6fe4030bd716be989438248074489337ba3275657f93595428be4fc03

EXPOSE 8080/tcp
SHELL [ "bash", "-c" ]
ENTRYPOINT [ "./container-init.sh" ]

ENV CI="true"

# renovate: datasource=npm depName=pnpm
ENV PNPM_VERSION="11.21.0"

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get --assume-yes upgrade \
&& rm --recursive --force /var/lib/apt/lists/*

RUN npm install --global pnpm@${PNPM_VERSION}

USER node
WORKDIR /docs
