forked from urbantrout/craftcms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
65 lines (53 loc) · 1.58 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
FROM php:7.2-fpm-alpine3.7
LABEL maintainer="[email protected]"
ENV COMPOSER_NO_INTERACTION=1
RUN set -ex \
&& apk add --update --no-cache \
freetype \
libpng \
libjpeg-turbo \
freetype-dev \
libpng-dev \
libjpeg-turbo-dev \
libxml2-dev \
autoconf \
g++ \
imagemagick \
imagemagick-dev \
libtool \
make \
pcre-dev \
mariadb-client \
libintl \
icu \
icu-dev \
bash \
jq \
git \
findutils \
gzip \
&& docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install mbstring iconv gd soap zip intl mysqli pdo_mysql \
&& pecl install imagick redis \
&& docker-php-ext-enable imagick redis \
&& rm -rf /tmp/pear \
&& apk del freetype-dev libpng-dev libjpeg-turbo-dev autoconf g++ libtool make pcre-dev
RUN apk add gnu-libiconv --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
COPY ./php.ini /usr/local/etc/php/
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY scripts/ /scripts/
RUN chown -R www-data:www-data /scripts \
&& chmod -R +x /scripts
WORKDIR /var/www/html
RUN chown -R www-data:www-data .
USER www-data
# Install Craft CMS and save original dependencies in file
RUN composer create-project craftcms/craft . \
&& cp composer.json composer.base
VOLUME [ "/var/www/html" ]
ENTRYPOINT [ "/scripts/run.sh" ]
CMD [ "docker-php-entrypoint", "php-fpm"]