forked from bliskapaczkapl/bliskapaczka-api-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (28 loc) · 1 KB
/
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
# PHPUnit Docker Container.
FROM composer/composer:php5
# Run some Debian packages installation.
ENV PACKAGES="php-pear curl"
RUN apt-get update && \
apt-get install -yq --no-install-recommends $PACKAGES && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Run xdebug installation.
RUN curl -L http://pecl.php.net/get/xdebug-2.4.0.tgz >> /usr/src/php/ext/xdebug.tgz && \
tar -xf /usr/src/php/ext/xdebug.tgz -C /usr/src/php/ext/ && \
rm /usr/src/php/ext/xdebug.tgz && \
docker-php-ext-install xdebug-2.4.0 && \
docker-php-ext-install pcntl && \
docker-php-ext-install exif && \
php -m
# Goto temporary directory.
WORKDIR /tmp
# Run composer and phpunit installation.
RUN composer selfupdate && \
composer require "phpunit/phpunit:^5.7" --prefer-source --no-interaction && \
ln -s /tmp/vendor/bin/phpunit /usr/local/bin/phpunit
# Set up the application directory.
VOLUME ["/app"]
WORKDIR /app
# Set up the command arguments.
ENTRYPOINT ["/usr/local/bin/phpunit"]
CMD ["--help"]