1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00
Mailu/docs/Dockerfile

33 lines
761 B
Docker
Raw Normal View History

# Convert .rst files to .html in temporary build container
FROM python:3.8-alpine3.14 AS build
2018-09-25 21:04:30 +02:00
2018-10-16 22:52:21 +02:00
ARG version=master
ENV VERSION=$version
COPY requirements.txt /requirements.txt
COPY . /docs
RUN apk add --no-cache --virtual .build-deps \
gcc musl-dev \
&& pip3 install -r /requirements.txt \
&& mkdir -p /build/$VERSION \
&& sphinx-build -W /docs /build/$VERSION \
&& apk del .build-deps
2018-09-25 21:04:30 +02:00
# Build nginx deployment image including generated html
FROM nginx:1.21-alpine
ARG version=master
ARG pinned_version=master
ENV VERSION=$version
ENV TZ Etc/UTC
LABEL version=$VERSION
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /build/$VERSION /build/$VERSION
2018-09-25 21:04:30 +02:00
2018-10-16 21:38:12 +02:00
EXPOSE 80/tcp
CMD nginx -g "daemon off;"
RUN echo $pinned_version >> /version