This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/Dockerfile

23 lines
1,008 B
Text
Raw Normal View History

FROM debian:stable-slim
ENV DEBIAN_FRONTEND=noninteractive
EXPOSE 8000
RUN apt update && apt install -y curl
HEALTHCHECK --interval=5m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1
RUN apt install -y php7.3-cli php7.3-gd php7.3-pgsql php7.3-mysql php7.3-sqlite3 php7.3-zip php7.3-dom php7.3-mbstring php-xdebug
2018-11-07 13:15:54 +00:00
RUN apt install -y composer imagemagick vim zip unzip
COPY composer.json composer.lock /app/
WORKDIR /app
RUN composer install
COPY . /app/
2018-11-07 13:15:54 +00:00
RUN mkdir -p data/config && \
echo "<?php define(\"DATABASE_DSN\", \"sqlite:data/shimmie.sqlite\");" > data/config/auto_install.conf.php && \
2019-11-03 18:55:37 +00:00
echo === Installing === && php index.php && \
echo === Smoke Test === && php index.php get-page /post/list && \
2020-01-26 13:19:35 +00:00
echo === Unit Tests === && ./vendor/bin/phpunit --configuration tests/phpunit.xml && \
2019-11-03 18:55:37 +00:00
echo === Cleaning === && rm -rf data
2020-01-26 13:19:35 +00:00
#echo === Unit Tests === && ./vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text && \
2019-02-02 12:06:21 +00:00
CMD "/app/tests/docker-init.sh"