############################################################################
#
# This file is part of BuildADoc.
#
# (c) Guido Obst
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
############################################################################

FROM gobst/buildadoc:1.0.0

LABEL maintainer="Guido Obst" \
	  description="BuildADoc develop image" \
	  version="1.0.0"

WORKDIR /var/www/html/BuildADoc

ARG php_version=8.3

# install xdebug
RUN aptitude update
RUN aptitude install -y php8.3-xdebug

# create folder
RUN mkdir tests \
    scripts \
    tools \
    bin/output

RUN chmod 777 bin/output

# copy directories and files
COPY ../../../tests tests
COPY ../../../cfg/dev cfg/dev
COPY ../../../scripts scripts
COPY ../../../tools tools
COPY ../../../res/docker/config/xdebug/xdebug.ini etc/php/${php_version}/mods-available/xdebug.ini
COPY ../../../res/docker/config/xdebug/xdebug.ini etc/php/${php_version}/cli/conf.d/20-xdebug.ini
COPY ../../../.git .git

COPY ../../../cfg/dev/phpunit.xml .
COPY ../../../cfg/dev/infection.json5 .

EXPOSE 8081

CMD tail -f /dev/null
