Skip to content

Commit 495e255

Browse files
fix doc dockerfile
1 parent 5066dfa commit 495e255

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

Dockerfile.build-doc

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,24 @@
22
# docker buildx create --use --driver=docker-container --name container --bootstrap
33
# docker buildx build . --cache-to type=local,dest=.cache,mode=max --cache-from type=local,src=.cache --platform=linux/arm64 --builder=container --progress plain -o docs/_build/html -f Dockerfile.build-doc
44

5-
# map source image to base
6-
FROM python:3.13 AS base
7-
ENV DEBIAN_FRONTEND=noninteractive
8-
WORKDIR /app
9-
RUN \
10-
--mount=type=cache,target=/var/cache/apt,sharing=shared \
11-
--mount=type=cache,target=/var/lib/apt,sharing=shared \
12-
rm -f /etc/apt/apt.conf.d/docker-clean && \
13-
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache && \
14-
apt-get update && \
15-
apt-get install -y patchelf musl-tools
16-
17-
FROM base AS builder
5+
FROM python:3.13 AS builder
186
WORKDIR /app
197
COPY LICENSE.md .
208
COPY README.md .
219
COPY requirements-pip.txt .
22-
COPY scripts scripts/
2310
COPY pyproject.toml .
2411
COPY docs docs/
2512
RUN \
2613
--mount=type=cache,target=/root/.cache/pip,sharing=shared \
2714
python3 -m venv .venv && \
2815
. .venv/bin/activate && \
29-
echo "List pip cache..." && \
30-
pip3 cache list && \
3116
python3 -m pip install --disable-pip-version-check -r requirements-pip.txt && \
3217
pip3 install --disable-pip-version-check --group doc
3318
RUN \
3419
. .venv/bin/activate && \
35-
echo "Building binaries..." && \
36-
sphinx-build docs docs/_build/html && \
37-
ls -la docs/_build/html
20+
echo "Building docs..." && \
21+
sphinx-build docs docs/_build/html
3822

3923
FROM scratch
4024
WORKDIR /
41-
COPY --from=builder /app/docs/_build/html/* .
42-
COPY --from=builder /app/docs/_build/html/_static/* ./_static/
43-
COPY --from=builder /app/docs/_build/html/_sources/* ./_sources/
44-
COPY --from=builder /app/docs/_build/html/.doctrees/* ./.doctrees/
25+
COPY --from=builder /app/docs/_build/html .

0 commit comments

Comments
 (0)