-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
37 lines (27 loc) · 912 Bytes
/
Dockerfile
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
ARG BASE_IMAGE_TAG
FROM wodby/php:${BASE_IMAGE_TAG}
ARG WEBGRIND_VER
# Actualize confih.php.tpl when updating version.
ENV WEBGRIND_VER="${WEBGRIND_VER}" \
WEBGRIND_ROOT="${APP_ROOT}/vendor/jokkedk/webgrind" \
PHP_ERROR_REPORTING="E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED"
USER root
RUN set -ex; \
\
apk add --update --no-cache --virtual .webgrind-rundeps graphviz python3 zlib py3-graphviz; \
apk add --update --no-cache --virtual .build-deps g++ zlib-dev; \
\
su-exec wodby composer require "jokkedk/webgrind:^${WEBGRIND_VER}"; \
cd "${WEBGRIND_ROOT}"; \
make; \
\
apk del --purge .build-deps; \
su-exec wodby composer clear-cache; \
rm -rf /var/cache/apk/*
USER wodby
WORKDIR "${WEBGRIND_ROOT}"
COPY templates /etc/gotpl/
COPY init /docker-entrypoint-init.d/
COPY bin /usr/local/bin/
EXPOSE 8080
CMD ["php", "-S", "0.0.0.0:8080", "index.php"]