Update Dockerfile
This commit is contained in:
parent
6178f7e687
commit
dfd657ba1a
1 changed files with 19 additions and 1 deletions
20
Dockerfile
20
Dockerfile
|
|
@ -1 +1,19 @@
|
||||||
FROM python:3.11-slim AS builder WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir --upgrade -r requirements.txt COPY . . RUN mkdocs build FROM nginx:alpine RUN rm -rf /usr/share/nginx/html/* COPY --from=builder /app/site /usr/share/nginx/html EXPOSE 80
|
FROM python:3.11-slim AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN mkdocs build
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
|
|
||||||
|
COPY --from=builder /app/site /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue