-
Notifications
You must be signed in to change notification settings - Fork 38
/
Dockerfile_py2.docs
38 lines (30 loc) · 982 Bytes
/
Dockerfile_py2.docs
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
38
### ---- MKDOCS base image ----
FROM alpine:latest AS build
ENV MKDOCS_VERSION="1.0.4" \
GIT_REPO='false' \
LIVE_RELOAD_SUPPORT='false' \
PYTHON_VERSION='2'
RUN \
apk add --update --no-cache \
ca-certificates \
bash \
git \
openssh \
linux-headers \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev \
py-setuptools; \
easy_install-2.7 pip && \
pip install mkdocs==${MKDOCS_VERSION} && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
RUN mkdir /workdir && cd /workdir && \
pip install pygments pymdown-extensions && \
mkdocs new mkdocs
ADD ./docs /workdir/mkdocs/docs
RUN cd mkdocs && mkdocs build --site-dir /site
WORKDIR /workdir/mkdocs
### ---- NGINX ----
FROM nginx:1.11-alpine
LABEL maintainer="Viktor Farcic <[email protected]>"
LABEL maintainer="Alessandro Affinito <[email protected]>"
COPY --from=build /site /usr/share/nginx/html