forked from KnpLabs/Gaufrette
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-php70
68 lines (51 loc) · 1.66 KB
/
Dockerfile-php70
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
57
58
59
60
61
62
63
64
65
66
67
68
FROM php:7.0-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="1.1.2"
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 php.ini /usr/local/etc/php/php.ini
COPY install-composer.sh /usr/local/bin/docker-gaufrette-install-composer
RUN chmod +x /usr/local/bin/docker-gaufrette-install-composer
RUN set -xe \
&& apk add --no-cache --virtual .fetch-deps \
openssl \
&& docker-gaufrette-install-composer \
&& mv composer.phar /usr/local/bin/composer \
&& apk del .fetch-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"]