forked from DesignPatternsPHP/DesignPatternsPHP
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (21 loc) · 636 Bytes
/
Dockerfile
File metadata and controls
24 lines (21 loc) · 636 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM composer AS composer
WORKDIR /app
ADD . /app
RUN composer install
FROM php:8-cli-alpine
WORKDIR /app
COPY --from=composer /app /app
RUN ./vendor/bin/phpcs --ignore=_build . \
&& ./vendor/bin/phpunit \
&& ./vendor/bin/psalm --show-info=false \
&& ./check-refs-readmes
FROM python AS sphinx_build
WORKDIR /app
COPY --from=composer /app /app
RUN pip3 install Sphinx sphinx_rtd_theme
ARG language=en
RUN make -e "SPHINXOPTS=-D language='${language}'" html
FROM nginx
WORKDIR /usr/share/nginx/html
COPY --from=sphinx_build /app/_build/html /usr/share/nginx/html
RUN rm index.html && mv README.html index.html