Update Dockerfile mkdocs setup to fix build errors
Signed-off-by: Nikolai Thingnes Leira <nikolai.thingnes.leira@soprasteria.com>
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'example-backend': patch
|
||||
---
|
||||
|
||||
Change base node image from node:18-bullseye-slim to node:18-bookworm-slim due to Docker build error on bullseye.
|
||||
|
||||
You can apply these change to your own `Dockerfile` by replacing `node:18-bullseye-slim` with `node:18-bookworm-slim`
|
||||
@@ -18,9 +18,15 @@ FROM node:18-bookworm-slim
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends libsqlite3-dev python3 python3-pip build-essential && \
|
||||
yarn config set python /usr/bin/python3 && \
|
||||
pip3 install mkdocs-techdocs-core==1.1.7
|
||||
apt-get install -y --no-install-recommends libsqlite3-dev python3 python3-pip python3-venv build-essential && \
|
||||
yarn config set python /usr/bin/python3
|
||||
|
||||
# Set up a virtual environment for mkdocs-techdocs-core.
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
RUN python3 -m venv $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
RUN pip3 install mkdocs-techdocs-core==1.1.7
|
||||
|
||||
# From here on we use the least-privileged `node` user to run the backend.
|
||||
WORKDIR /app
|
||||
|
||||
Reference in New Issue
Block a user