-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (25 loc) · 815 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
FROM php:7.4-fpm
LABEL maintainer="Bahadır Birsöz <github.com/bahadirbirsoz>"
RUN apt-get update
RUN apt-get install -y zlib1g-dev
RUN apt-get install -y libpng-dev
RUN apt-get install -y libzip-dev
RUN apt-get install -y unzip
RUN docker-php-ext-install gd
RUN docker-php-ext-install pdo pdo_mysql
RUN apt-get install git -y
RUN pecl install xdebug
WORKDIR /app
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY composer.json .
COPY composer.lock .
COPY phpunit.xml phpunit.xml
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
ADD src src
ADD tests tests
RUN composer install
RUN chmod +x $PWD/vendor/bin/*
RUN ln -s $PWD/vendor/bin/* /usr/local/bin/
RUN composer dump-autoload
RUN apt-get clean -y
ENTRYPOINT ["/usr/local/bin/phpunit"]