1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-07-03 00:47:16 +02:00
Files
.github
core
design
docs
_templates
assets
compose
contributors
kubernetes
swarm
.env
Dockerfile
antispam.rst
cli.rst
conf.py
configuration.rst
database.rst
demo.rst
dns.rst
docker-compose.yml
faq.rst
features.rst
general.rst
index.rst
maintain.rst
nginx.conf
releases.rst
requirements.txt
reverse.rst
rpi_build.rst
setup.rst
webadministration.rst
optional
setup
tests
towncrier
webmails
.gitignore
.mergify.yml
AUTHORS.md
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE.md
PULL_REQUEST_TEMPLATE.md
README.md
RELEASE_TEMPLATE.md
bors.toml
pyproject.toml
Mailu/docs/Dockerfile
Dimitri Huisman f7677543c6 Process code review remarks
- Moved run to bottom of Dockerfile to allow using unmodified / cached states.
- Simplified bash code in deploy.sh.
- Improved the large bash one-liner in CI.yml. It could not handle >9 for 1.x.
2021-11-18 17:21:56 +00:00

33 lines
761 B
Docker

# Convert .rst files to .html in temporary build container
FROM python:3.8-alpine3.14 AS build
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
# 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
EXPOSE 80/tcp
CMD nginx -g "daemon off;"
RUN echo $pinned_version >> /version