forked from pmsipilot/docker-compose-viz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (25 loc) · 790 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
FROM php:7.4-alpine as builder
COPY composer.json /dcv/composer.json
COPY composer.lock /dcv/composer.lock
WORKDIR /dcv
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
php composer.phar install --prefer-dist
FROM php:7.4-alpine
RUN apk update && \
apk add graphviz ttf-dejavu && \
rm -rf \
/var/cache/apk/* \
/tmp/*
COPY bin/ /dcv/bin
COPY src/ /dcv/src
COPY --from=builder /dcv/vendor /dcv/vendor
RUN chmod +x /dcv/bin/dcv
RUN addgroup dcv && \
adduser -D -G dcv -s /bin/bash -g "docker-compose-viz" -h /input dcv
USER dcv
VOLUME /input
WORKDIR /input
ENTRYPOINT ["/dcv/bin/entrypoint.sh"]
CMD ["render", "-m", "image", "-f"]