forked from decred/dcrdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (25 loc) · 860 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Build image
FROM python:3.11
LABEL description="dcrdocs build"
LABEL version="1.0"
LABEL maintainer "jholdstock@decred.org"
USER root
WORKDIR /root
RUN python -m pip install --upgrade pip
COPY ./ /root/
RUN pip install mkdocs && \
pip install --user -r requirements.txt
# Install dependencies for generating social cards.
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards
RUN apt update && \
apt install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev && \
pip install pillow cairosvg
ENV DCRDOCS_CARDS true
RUN ./bin/build_docs.sh
# Serve image (stable nginx version)
FROM nginx:1.22-alpine
LABEL description="dcrdocs serve"
LABEL version="1.0"
LABEL maintainer "jholdstock@decred.org"
COPY conf/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=0 ./root/site/ /usr/share/nginx/html