This repository has been archived by the owner on May 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.template
54 lines (49 loc) · 1.59 KB
/
Dockerfile.template
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
FROM php:${php.version}-cli-${php.variant}
# Magento 2 does not support Composer 2
COPY --from=composer:1 /usr/bin/composer /usr/bin/composer
<% if (php.variant.startsWith('alpine')) { %>
RUN apk add --no-cache unzip \
rsync \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
icu-dev \
libxslt-dev \
libzip-dev \
curl \
g++ \
make \
libxml2-dev \
git \
libsodium-dev
<% } else { %>
RUN apt-get update && apt-get install -y \
unzip \
rsync \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libicu-dev \
libxslt-dev \
libzip-dev \
curl \
build-essential \
libxml2-dev \
git-core \
libsodium-dev
<% } %>
# See https://github.com/docker-library/php/issues/912#issuecomment-559918036
<% if (semver.satisfies(semver.coerce(php.version), '>= 7.4')) { %>
RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ && docker-php-ext-install gd
<% } else { %>
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd
<% } %>
RUN docker-php-ext-install intl
RUN docker-php-ext-install xsl
RUN docker-php-ext-install zip
RUN docker-php-ext-install pdo pdo_mysql
RUN docker-php-ext-install soap
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install sodium
# "sockets" is only necessary for Magento >= 2.4 but apparently Magento Commerce (EE) 2.3 requires it as well
RUN docker-php-ext-install sockets