forked from KnpLabs/Gaufrette
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-php56
56 lines (42 loc) · 1.31 KB
/
Dockerfile-php56
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM php:5.6-alpine
ENV SRC_DIR /usr/src/gaufrette
RUN apk add --no-cache --virtual .persistent-deps \
git \
zlib
# PHP extensions
ENV MONGODB_VERSION="1.2.11" \
SSH2_VERSION="0.13"
RUN set -xe \
&& apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
libssh2-dev \
zlib-dev \
&& docker-php-ext-install \
zip \
&& pecl install \
mongodb-${MONGODB_VERSION} \
ssh2-${SSH2_VERSION} \
&& docker-php-ext-enable --ini-name 05-opcache.ini opcache \
&& docker-php-ext-enable \
mongodb \
ssh2 \
&& apk del .build-deps
COPY docker/php.ini /usr/local/etc/php/php.ini
COPY docker/install-composer.sh /usr/local/bin/install-composer
RUN chmod +x /usr/local/bin/install-composer
RUN set -xe \
&& install-composer \
&& mv composer.phar /usr/local/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN composer global require "hirak/prestissimo" --prefer-dist --no-progress --no-suggest --optimize-autoloader --apcu-autoloader \
&& composer clear-cache
WORKDIR ${SRC_DIR}
COPY composer.json ./
RUN composer update --prefer-dist --no-autoloader --no-scripts --no-progress --no-suggest \
&& composer clear-cache
COPY spec spec/
COPY src src/
COPY tests tests/
COPY bin/tests bin/tests
RUN composer dump-autoload
CMD ["bin/tests"]