From 9402e6b5ca4140f73a6fc0b802d417378142545e Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 22 Mar 2023 14:58:38 +0700 Subject: [PATCH] simplify docker build --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a1c1137..b3b05a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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