Skip to content

Commit eafb004

Browse files
committed
Merge branch 'master' into feature/mysql-configuration
# Conflicts: # .env.dist
2 parents 0044679 + 6cf6694 commit eafb004

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

.env.dist

+3-1
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,15 @@ RABBITMQ=no
157157
SUPERVISOR=no
158158
ELASTICSEARCH=no
159159
NGROK=no
160+
MYSQL=yes
160161
MONGODB=no
161162
BLACKFIRE=no
162163
ELK=no
163164
SF_CLI=no
164165
DOCKER_ENV_PHP=no
165166
PHP_IMAGICK=no
166-
MYSQL=yes
167+
PHP_GD=no
168+
PHP_IMAP=no
167169

168170
# Enable ionCube
169171
# ionCube is a PHP module extension that loads encrypted PHP files and speeds up webpages.

commands/start.go

+17-1
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,30 @@ func doPhpBuild() {
204204

205205
packageList := []string{"gnupg2", "openssl", "git", "unzip", "libzip-dev", "nano", "libpng-dev", "libmagickwand-dev", "curl", "openssh-client", "less", "inkscape", "cron", "exiftool", "libicu-dev", "libmcrypt-dev", "libc-client-dev", "libkrb5-dev", "libssl-dev", "libxslt1-dev", "bash-completion"}
206206
peclInstall := []string{}
207-
phpExtInstall := []string{"pdo", "pdo_mysql", "opcache", "zip", "gd", "mysqli", "exif", "bcmath", "calendar", "intl", "soap", "imap", "sockets", "xsl"}
207+
phpExtInstall := []string{"pdo", "pdo_mysql", "opcache", "zip", "mysqli", "exif", "bcmath", "calendar", "intl", "soap", "sockets", "xsl"}
208208
phpExtEnable := []string{"mysqli", "calendar", "exif", "bcmath"}
209209
npmInstallGlobal := []string{}
210210

211211
if os.Getenv("SF_CLI") == "yes" {
212212
packageList = append(packageList, "symfony-cli")
213213
}
214214

215+
if os.Getenv("PHP_GD") == "yes" {
216+
phpExtInstall = append(phpExtInstall, "gd")
217+
218+
util.Sed("__PHP_GD__", "&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/", "config/php/Dockerfile")
219+
} else {
220+
util.Sed("__PHP_GD__", "", "config/php/Dockerfile")
221+
}
222+
223+
if os.Getenv("PHP_IMAP") == "yes" {
224+
phpExtInstall = append(phpExtInstall, "imap")
225+
226+
util.Sed("__PHP_IMAP__", "&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl", "config/php/Dockerfile")
227+
} else {
228+
util.Sed("__PHP_IMAP__", "", "config/php/Dockerfile")
229+
}
230+
215231
if os.Getenv("PHP_VERSION") != "8.2" {
216232
if os.Getenv("PHP_IMAGICK") == "yes" {
217233
peclInstall = append(peclInstall, "imagick")

config/php/Dockerfile.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RUN __SYMFONY_CLI__
3232
__CLEANUP__
3333

3434
# Install PHP extensions. Type docker-php-ext-install to see available extensions
35-
RUN docker-php-ext-configure zip --with-libzip && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-configure intl && docker-php-ext-configure imap --with-kerberos --with-imap-ssl && docker-php-ext-install -j$(nproc) __PHP_EXT_INSTALL__ \
35+
RUN docker-php-ext-configure zip --with-libzip __PHP_GD__ && docker-php-ext-configure intl __PHP_IMAP__ && docker-php-ext-install -j$(nproc) __PHP_EXT_INSTALL__ \
3636
&& pecl install __PECL_INSTALL__ && docker-php-ext-enable __PHP_EXT_ENABLE__ \
3737
&& ln -snf /usr/share/zoneinfo/${DEFAULT_TIMEZONE} /etc/localtime && echo ${DEFAULT_TIMEZONE} > /etc/timezone \
3838
&& printf '[PHP]\ndate.timezone = "%s"\n' ${DEFAULT_TIMEZONE} > $PHP_INI_DIR/conf.d/tzone.ini \

0 commit comments

Comments
 (0)