-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
60 lines (60 loc) · 1.33 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
ARG COMPOSER_VERSION
ARG PHP_VERSION
FROM composer:$COMPOSER_VERSION AS composer_downloader
FROM php:$PHP_VERSION-cli
# Versions
ARG XDEBUG_VERSION
# OpCache settings
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0"
ENV XDEBUG_MODE="debug,coverage"
# Install system dependencies
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y \
curl \
git \
libpng-dev \
libonig-dev \
libpq-dev \
libxml2-dev \
libzip-dev \
unzip \
zip
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Setup PHPXDebug
RUN pecl install xdebug-$XDEBUG_VERSION
# Install PHP extensions
RUN docker-php-ext-install \
bcmath \
exif \
gd \
mbstring \
mysqli \
opcache \
pcntl \
pdo \
pdo_mysql \
pdo_pgsql \
soap \
zip \
&& docker-php-ext-enable \
bcmath \
exif \
gd \
mbstring \
mysqli \
pcntl \
pdo \
pdo_mysql \
pdo_pgsql \
soap \
xdebug
# Get latest Composer
COPY --from=composer_downloader /usr/bin/composer /usr/bin/composer
# Add custom ini files
COPY config/10-shorttag.ini \
config/20-memory-limit.ini \
config/30-opcache.ini \
config/40-xdebug.ini \
$PHP_INI_DIR/conf.d/
# Create folder
RUN mkdir -p /data