forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
81 lines (70 loc) · 1.83 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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM php:7.4-cli
LABEL maintainer="Tobias Munk <[email protected]>"
# Install required system packages
RUN apt-get update && \
apt-get -y install \
git \
zlib1g-dev \
libmemcached-dev \
libpq-dev \
libssl-dev \
libxml2-dev \
libzip-dev \
unzip \
--no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install php extensions
RUN docker-php-ext-install \
bcmath \
mysqli \
pdo pdo_mysql pdo_pgsql \
soap \
sockets \
zip
# Install pecl extensions
RUN pecl install \
apcu \
memcached \
mongodb \
soap \
xdebug-3.0.4 && \
docker-php-ext-enable \
apcu.so \
memcached.so \
mongodb.so \
soap.so \
xdebug
# Configure php
RUN echo "date.timezone = UTC" >> /usr/local/etc/php/php.ini
# Install composer
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php -- \
--filename=composer \
--install-dir=/usr/local/bin
# Add source-code
COPY . /repo
# Prepare application
WORKDIR /repo
# Install modules
RUN composer require --no-update \
codeception/module-apc \
codeception/module-asserts \
codeception/module-cli \
codeception/module-db \
codeception/module-filesystem \
codeception/module-ftp \
codeception/module-memcache \
codeception/module-mongodb \
codeception/module-phpbrowser \
codeception/module-redis \
codeception/module-rest \
codeception/module-sequence \
codeception/module-soap \
codeception/module-webdriver && \
composer update --no-dev --prefer-dist --no-interaction --optimize-autoloader --apcu-autoloader
ENV PATH /repo:${PATH}
ENTRYPOINT ["codecept"]
# Prepare host-volume working directory
RUN mkdir /project
WORKDIR /project