DocERP/docker/Dockerfile

49 lines
1.4 KiB
Docker
Raw Normal View History

2022-05-24 12:52:25 +00:00
FROM alpine:latest AS builder
ENV MKDOCS_VERSION=1.1.0 \
DOCS_DIRECTORY='/mkdocs' \
LIVE_RELOAD_SUPPORT='false' \
ADD_MODULES='false' \
FAST_MODE='false' \
PYTHONUNBUFFERED=1 \
GIT_REPO='false' \
GIT_BRANCH='master' \
AUTO_UPDATE='false' \
UPDATE_INTERVAL=15
ADD docker/container-files/ /
2022-10-25 06:41:16 +00:00
ADD mkdocs/requirements.txt /requirements.txt
2022-05-24 12:52:25 +00:00
RUN \
apk add --update \
ca-certificates \
bash \
git \
openssh \
python3 \
python3-dev \
py3-setuptools \
py-pip \
build-base \
libffi-dev cairo-dev cairo cairo-tools \
jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev
RUN \
pip install --upgrade pip && \
2022-10-25 06:41:16 +00:00
pip install -r /requirements.txt && \
# pip install mkdocs==${MKDOCS_VERSION} && \
# pip install mkdocs-material && \
# pip install mkdocs-img2fig-plugin && \
2022-05-24 12:52:25 +00:00
cd /bootstrap && pip install -e /bootstrap && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* && \
chmod 600 /root/.ssh/config
CMD ["/usr/bin/bootstrap", "start"]
FROM builder as makestatic
ADD docs /src/docs/
ADD mkdocs.yml /src/
RUN cd /src && mkdocs build
FROM nginx
# RUN rm /etc/nginx/sites-enabled/default
COPY docker/default.conf /etc/nginx/conf.d/default.conf
COPY --from=makestatic /src/site /sites/app.lexema.ru/docs