simplify docker build

This commit is contained in:
simon 2023-03-22 14:58:38 +07:00
parent f7e37de0eb
commit 9402e6b5ca
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 4 additions and 6 deletions

View File

@ -3,15 +3,13 @@
FROM python:3.10.9-slim-bullseye AS builder
ENV PATH=/root/.local/bin:$PATH
RUN apt-get update && apt-get install -y --no-install-recommends \
git
COPY requirements.txt /requirements.txt
RUN pip install --user -r requirements.txt
RUN git clone https://github.com/tubearchivist/docs.git
WORKDIR docs/mkdocs
RUN mkdir /mkdocs
COPY mkdocs /mkdocs
WORKDIR mkdocs
RUN mkdocs build
FROM nginx as srv
COPY --from=builder docs/mkdocs/site /usr/share/nginx/html
COPY --from=builder /mkdocs/site /usr/share/nginx/html