docker-compose-viz/Dockerfile

37 lines
801 B
Docker
Raw Permalink Normal View History

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
2016-08-05 15:10:28 +02:00
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
2016-08-05 15:10:28 +02:00
2016-08-09 16:41:17 +02:00
RUN chmod +x /dcv/bin/dcv
2016-08-05 15:10:28 +02:00
RUN addgroup dcv && \
adduser -D -G dcv -s /bin/bash -g "docker-compose-viz" -h /input dcv
2024-03-18 13:41:09 +01:00
#USER dcv
USER root
2016-08-05 15:10:28 +02:00
VOLUME /input
WORKDIR /input
ENTRYPOINT ["/dcv/bin/entrypoint.sh"]
2016-08-05 15:10:28 +02:00
CMD ["render", "-m", "image", "-f"]