-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile-alpine
executable file
·96 lines (86 loc) · 2.34 KB
/
Dockerfile-alpine
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# PHP Docker image for Yii 2.0 Framework runtime
# ==============================================
ARG PHP_BASE_IMAGE_VERSION
FROM php:${PHP_BASE_IMAGE_VERSION}
# Install system packages & PHP extensions required for Yii 2.0 Framework
RUN apk --update --virtual build-deps add \
autoconf \
make \
gcc \
g++ \
libtool \
icu-dev \
curl-dev \
freetype-dev \
imagemagick-dev \
pcre-dev \
postgresql-dev \
libjpeg-turbo-dev \
libpng-dev \
libxml2-dev && \
apk add \
git \
curl \
bash \
bash-completion \
icu \
imagemagick \
pcre \
freetype \
libintl \
libjpeg-turbo \
libpng \
libltdl \
libxml2 \
mysql-client \
postgresql && \
docker-php-ext-configure gd \
--with-gd \
--with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ && \
docker-php-ext-configure bcmath && \
docker-php-ext-install \
soap \
zip \
curl \
bcmath \
exif \
gd \
iconv \
intl \
mbstring \
opcache \
pdo_mysql \
pdo_pgsql && \
pecl install \
imagick \
mongodb && \
apk del \
build-deps
RUN echo "extension=imagick.so" > /usr/local/etc/php/conf.d/pecl-imagick.ini && \
echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/pecl-mongodb.ini
# Configure version constraints
ENV PHP_ENABLE_XDEBUG=0 \
PATH=/app:/app/vendor/bin:/root/.composer/vendor/bin:$PATH \
TERM=linux \
VERSION_PRESTISSIMO_PLUGIN=^0.3.7 \
COMPOSER_ALLOW_SUPERUSER=1
# Add configuration files
COPY image-files/ /
# Add GITHUB_API_TOKEN support for composer
RUN chmod 700 \
/usr/local/bin/docker-php-entrypoint \
/usr/local/bin/composer
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--filename=composer.phar \
--install-dir=/usr/local/bin && \
composer clear-cache
# Install composer plugins
RUN composer global require --optimize-autoloader \
"hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && \
composer global dumpautoload --optimize && \
composer clear-cache
# Application environment
WORKDIR /app